Visual Studio 2019 not showing 'View in Browser' option - visual-studio-2019

I'm taking a course in HTML & CSS that requires Visual Studio 2019. I've written the exact script shown in the video over and over but there is no option to 'View in Browser'. I have no previous experience with JavaScript and very little Visual Basic. I've never used visual studio before.
I've uninstalled and reinstalled VS several times with the same problem.
Please help me!!
One of the examples I'm asked to type:
There is no option to 'View in Browser when right clicking or clicking the File tab.
I tried the solutions offered for VS 2017 but they did not work.
My laptop is a fairly new HP with Windows 10 installed.
Below is what comes up when I right click on the script.
enter image description here

If your HTML file is part of a project in Visual Studio, then here is one way to view your file in a browser.
Right-click on the project name in the Solution Explorer window
Select View > View in Browser
You may need to manually change the URL in your browser to get to your HTML file.

Related

Self created templates not shown in the "New Project" dialog in the Visual Studio 2019

I have created a C++ template with certain configurations in visual studio 2019, which is saved as a .zip file in the default ProjectTemplates folder.
However, when I open the New Project dialog, I couldn't find my new template, the dialog only shows me 3 options under the left Recent templates tag which is not what I want, and I can't find my own template in the right Scoll-down menu.
Please tell me how to create a new project from self-created template.
By updating my VS 2019 to professional edition, I managed to see my templates in the New project list. I am not extremely sure about the reason, just give a hint for this issue.

Codesmith generator 8.0, VS 2019 right click context menu does not have manage output option for .csp files

We upgraded to CodeSmith 8.0 from 5.2. We are using Visual Studio 2019.
I was able to upgrade the codesmith .cst templates. The right click menu on Visual studio 2019 solution explorer doesn't show Manage outputs, generate output or any of codesmith right click options for .csp files
It shows the right click options in windows explorer for .csp files but not for VS 2019.
See the two screenshots. Do I need to do anything special for the options to show up on VS 2019?
Right click menu from Windows explorer. There are code smith options when I right click on the .csp file
Visual Studio 2019
I work at CodeSmith Tools.. Microsoft broke the world with VS2019 and we are currently blocked by VSIX changes in VS2019 where Roslyn bin folder dependencies are not being deployed within the VSIX. This makes testing / development even more difficult. Until a fix is out we can't resume development of VS2019 as we can't even debug it :.

Visual Studio 2015 MVC application template missing

In Visual Studio 2015 when I want to create MVC application there is no MVC option like below
Also when I open a .cshtml file look like below (not formatting, not coloring, not intellisense)
I tried below suggestions but doesn't resolve
Install web developer tools by Visual Studio setup modification
Change .net framework version from project screen
devenv.exe /resetuserdata
Delete %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache files
How can I solve ?
Try update web tools in visual studio 2015 - I had the same problem
Maybe you have selected the wrong file editor.
How to set other editor:
Click with your right mouse button on the View/HTML-page.
Click on: Open with...
Click on HTML editor (see image below)
Set the good editor as default:
Click on Set as Default (image below)
This problem can occur by clicking on an other editor and clicked by Set as Default.

Umbraco MVC4 IntelliSense not working

I'm working on a few Umbraco projects that use MVC4. The MVC intellisense doesn't work within visual studio and I get lots of errors underlined. But when I run build the project, I don't get any errors, and when I run the site everything works fine.
I'm using Visual Studio 2013 and I created a new MVC4 site and compared the web.configs within the Views folder and they're identical.
I'm pretty sure it's not a code problem as my colleague is using the same code and he doesn't have this problem.
I've just done a fresh install of Visual Studio 2013.
Any ideas?
This could be a clue:
When I hover over #Htmlit tells me that my HtmlHelper is a System.Web.WebPages.Html.HtmlHelper instead of a System.Web.Mvc.HtmlHelper
The common one is to ensure that it is switched on (Visual Studio menu: Tools > Options > Text Editor > All Languages (or C# if you want it just for that language) > Tick "Auto list members", Untick "Hid advanced members", tick "Parameter information")
Once you've checked this, sometimes if you're using one HDD on Windows, because the disk has its bandwidth used up (particularly if using ReSharper then you need two or more drives ideally with the pagefile going to the non-OS drive I find). This is the case if the red lines do disappear after up to two minutes of not touching the IDE.
Finally check you project's references folder to make sure where the paths for your includes are coming from and that Visual Studio has permission to read from there. Permission issues cause all manner of problems I find, so when you launch VS, right click and choose "run as Administrator".
Hopefully one of these solves your problems. If not, then please update your question to explain how you create your project. Do you create an empty site or an MVC site? Do you then use Nuget to install Umbraco through the Package Manager Console like this?
Install-Package UmbracoCms

Visual Studio 2015 "Not Responding" when adding an MVC controller or view

We are attempting to add MVC to an old, large, legacy webforms app. (The intent is to gradually re-implement portions of the app using MVC until the old app is gone).
Setting it up has gone smoothly. We have an MVC Area, and I created a controller which is accessible when running the app, by means on directly typing the url.
But whenever we "Add > Controller" or "Add > View"... Visual Studio hangs for around 10 minutes "Not Responding".
Clearly there is some bug in visual studio interacting with some quirk in our legacy project.
Googling, I have so far found only a few similar cases that are old & do not seem applicable.
Not sure where to begin resolving this.
UPDATE:
For what it is worth, we have converted the original VB webforms project to C#. I then added MVC Nuget package and and MVC area. Visual studio no longer seems to hang when adding controllers. So this might be a VB specific thing. Or maybe some windows update to visual studio fixed this in the interim since i posted this. Not sure.
The problem is still present in Visual Studio 2015 Update 1.
As a workaround, instead of selecting "Add View" you can select "New Item" and choose a page template from Web/MVC instead.
It is still in Visual Studio 2017; It takes time and you can restart making Controller/View or you can wait sometimes
this seems like bugs from visual studio,
you can copy other controller and paste it then rename namespace.
for temporary until visual studio is fixed.
I'm having the same issue. This should work. I'm selecting "Add Controller" from the context menu. It just spins saying Visual Studio not responding. This is with Visual Studio 2015.
In my case this situation arises when adding view to the controller and visual studio 2015 hangs indefinitely. However it creates the view file in the directory but not shown in solution explorer. I have manually copy pasted the file from directory to solution explorer and everything worked well.
Check if the below blog could help resolve your issue
http://digioz.blogspot.co.uk/2013/06/visual-studio-2012-freezes-or-crashes.html

Resources