How to reinstall MVC 2 tools for VS2010? - visual-studio-2010

I accidentally uninstalled the Asp.Net MVC 2 Tools for Visual Studio 2010. How can I reinstall it? The MVC2 download only seems to include the VS2008 tools.
Everything I've googled says that MVC 2 is included in VS2010, but a repair install didn't fix it, and MVC 2 isn't listed as a selectable component in the VS2010's add/remove components screen.

You'll find VS2010ToolsMVC2.msi on your VS2010 DVD under WCU\ASPNETMVC - hopefully that will do it!

Related

Visual Studio thinks `Microsoft Web Developer Tools` is installed

Symptoms
Visual Studio syntax highlighter and Intellisense for Javascript and Razor views are not working.
There is no Web templates installed when creating a new project.
When I try to uninstall the web developer feature:
Add or remove Programs > Microsoft Visual Studio Professional 2015 > Modify
Microsoft Web Developer Tools is always checked. Even when I uncheck it and uninstall it, then restart the computer; the next time I still see it's checked:
What I did to solve this:
Running devenv.exe \resetuserdata Command to reset the user data.
Running devenv.exe \installtemplates to install the templates.
Repairing the Visual Studio.
Trying to uninstall and re-install the Web Developer Tools feature through the Visual Studio installer.
None have worked so far.
What I guess
I think Visual Studio thinks this feature is installed (through some registry keys probably) but the files are actually not installed.
Because whenever I try to Modify the installation of Visual Studio, the Microsof Web Developer Tools check box is not checked for the first second, then it is checked again after 1 second.
Question
Any suggestion on fixing this without uninstalling Visual Studio itself?
I was having the same problem and this is what worked for me:
Uninstall ASP.NET Web Tools from Control Panel
Download and install "Microsoft ASP.NET and Web Tools" extension from: https://visualstudiogallery.msdn.microsoft.com/c94a02e9-f2e9-4bad-a952-a63a967e3935
Try this (in order):
Find Microsoft ASP.NET 5 RC1 ... in control panel / programs &
select modify
Select repair
Run devenv.exe /installvstemplates as administrator
Run VS as administrator
I had the same problem with Visual Studio 2015. I tried several things, but simply updating Microsoft ASP.NET seemed to do the trick.
Install ASP.NET 5 RC1, restart, and the issue should be resolved.
I didn't know I had this problem until I opened an MVC project with Razor views and didn't have syntax highlighter and Intellisense. I was lucky to read your question because the symptoms are the same and so is the conclusion. And unfortunately none of the answers solves the problem. But it did help me to find the answer, or what worked for me.
What did the trick was installing .NET Core 1.0.0 (DotNetCore.1.0.0.RC2-Runtime-x64 and DotNetCore.1.0.0.RC2-VS2015Tools.Preview1). I am pretty sure that this is enough to solve the issue. But since I tried all kinds of things, it is possible that another action is required. In that case, continue reading below the images.
When I start a new project this opens the following dialog:
Selecting ASP.NET Web Application (.NET Framework) opens the dialog with the projects I was looking for.
The syntax highlighter and Intellisense are also working for Razor views.
I do not know what caused the problem in the first place. Is the installation incomplete, is there a conflict with other software or did I do something that caused this?
Visual Studio 2012 is installed on my machine as well. I installed and uninstalled VS2015 (pro and community version) and then installed vs2015 Community on multiple volumes. On uninstalling I did use /Force and removed several folders manually.
Microsoft ASP.NET 5 RC Update 1 is also installed, but repairing this did not solve the issue. Also installing Asp.Net Web Framework tools 2015 didn't change anything. I copied templates to all template folders I could find (perhaps an issue with installing on multiple volumes?), ran devenv.exe with different parameters and deleted the '14' folder in my profile. None of this worked. Finally I installed .NET Core 1.0.0.

MVC 3 Razor Intellisense

I have Visual Studio 2010 Ultimate installed with SP1 RTM and MVC 3 RTM installed as well. The problem I am having is that the Razor intellisense will not work. When I start a new MVC 3 project with the Razor engine and open a view, the Razor highlighting works but all of the key words are underlined with red squiggles and the intellisense doesn't work. I do not have ReSharper installed.
I have tried reinstalling MVC 2, MVC 3, and Visual Studio 2010 Ultimate but intellisense will still not work for Razor. Has anyone else had this issue, or know how to fix it?
Thanks in advance!
When uninstalling make sure to uninstall all of the below:
Microsoft ASP.NET MVC 3
Microsoft ASP.NET MVC 3 - Visual Studio 2010 Tools Update (you might not have this one installed)
Microsoft ASP.NET Web Pages
Microsoft ASP.NET Web Pages - Visual Studio 2010 Tools
Now install the following:
ASP.NET MVC 3 Tools Update
Razor Intellisense should work.
Its possible that you're not opening Razor files with the right editor. This is particularly likely if you were using Razor before the RTM came out, when there was no Razor editor.
Right-click on one of your .cshtml files and select "Open With", and make sure that the default is the "Razor Editor" and not the HTML or XML editors. Pre-RTM, the auto-detection would have picked the XML editor as the correct one based on the presence of XML tags.
Also, you said that you've reinstalled everything, but the actual Intellisense support comes from a package called "ASP.NET Web Pages Visual Studio Tools", which is installed as part of MVC. If you are actually using the Razor editor and have no Intellisense, uninstall MVC3 and the web pages tools, and reinstall them both.
This solution is worked for me :)
When i uninstalled (i should never install) SP1 update for visual studio, my razor support had gone away, i try to uninstall and install MVC3 Tools update many times but it didn't worked.
After that I right click the installer and extract the package and i saw the seperated .msi installers in it. I installed one by one which are i needed and it worked :)
I hope it helps other user.

Visual Studio 2010 not recognisng .cshtml files

I recenetly reinstalled Visual Studio 2010 and since doing so I can not figure out how to get it to recognise .cshtml files again... I tried installing MVC 3 but it said it was already installed, basically when I open the .cshtml files in Visual Studio they have no code high lighting or intelli sense.
Any sugestions?
Thanks,
Alex.
You'll need to reinstall the Microsoft ASP.NET MVC 3 - Visual Studio 2010 tools.
You might just be able to do a repair install of MVC 3. If that doesn't work, I'd uninstall MVC 3 (making sure it removes the tools too) and re-install them both.
And even if you install it right, there is no support for a visual editor. It will remain in code view. However, with MVC3 and beyond, there is good support for intellisense.

asp.net mvc 3 installed but no templates in vs 2010

when creating a new project
and
no error messages in setup either !!
I have repeated the setup a few times to no avail
anyone else have the same issue or find an answer ?
Make sure you are targetting .NET 4
Make sure you have removed any previous Beta and RC versions before installing the ASP.NET MVC 3 RTM. Also try installing it by downloading the full installer. Once installed you should see the new templates when creating a new web application in Visual Studio. The templates appear when creating a new web application and not new web site.
I installed MVC 3 from the Windows Platform installer and it worked as expected, and templates were created.
I've been struggling with this issue for a couple of hours until i solved the problem by these steps:
Uninstall SP1 for Visual Studio 2010
Repair Visual Studio 2010
Reinstall SP1 for VS2010
I hope you save some time by taking these steps.

Unable to create a new MVC project in VS 2010 Beta 2 :( What the?

I'm trying to make a new ASP.NET MVC2 web site project, in Visual Studio 2010 Beta 2.
When I try, there is no ASP.NET MVC2 Web Application option. :(
Check this out...
alt text http://img528.imageshack.us/img528/9123/22433423.png
Hmm :( I tried reinstalling B2 (option I chose -> REPAIR).
And it's still not there (refer to that screenshot above).
Is there a way for me to manually add/register it back with my system, please?
ASP.NET MVC2 and Visual Studio 2010 Beta 2 are not compatible.
Best bet is to wait for the VS10 RC that should be coming out in the next month.
I haven't installed Visual Studo 2010, but what happens if you select .NET 3.5? Sorry if stating the obvious.
I fixed it - I had to 100% uninstall VS2010 B2 and the install it again. A reinstall OVER the existing copy did not work.
Fixed :)

Resources