Ever since I updated my projects for VS 11 I can't get my #Model intellisense to work in either version of Visual Studio (2010 or 11). I've tried reverting the .csproj file to remove the VS 11 references, but to no avail. Other MVC 3 Razor project are working just fine. Anyone experience this?
Not working in both versions of Visual Studio smells like the install is possibly corrupted a bit. My first step would be to try and repair the Visual Studio 2010 install and see if the Intellisense behavior comes back for 2010 only.
Control Panel
Add / Remove Programs
Visual Studio 2010
Select Repair in the menu
If this works then you could be happy with the returned intellisense or try the same steps for Visual Studio 11 and hope it fixes it for both. But if the installation of 2011 is to blame then very likely it would just immediately rebreak both of them
I found this article that addressed my issue.
EDIT:
It seems that some combination of installing VS 11 and some tool updates caused this issue. I got luck and managed to get the following error message:
The type System.Web.Mvc.ModelClientValidationRule exists in both c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.O\Assemblies\System.Web.WebPages.dll and c:\Program
Files (6)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll
After doing some digging I wound up uninstalling "Microsoft ASP.NET Web Pages 2 - Visual Studio 2010 Tools", which resulted in everything working. Granted it may have been a better idea to uninstall "Microsoft ASP.NET Web Pages - Visual Studio 2010 Tools" instead, but this is working at the moment.
I found a complete lack of information on the Internet about this type of issue, so I'm putting it here for posterity.
Related
My razor file is not having proper highlighting and intellisense is not working.
Razor file in vs2015 image:-
I tried solutions in Visual Studio 2015 not syntax highlighting razor nor Intellisense , Visual Studio 2015 Razor View MVC Types not recognized but it didn't help me.
I installed vs2015 (with update 3) two days before. So i didn't try reinstalling it.
After some search i found the solution. the issue was with the Microsoft web development tool it was not installed correctly( I still don't know why :) ) in my system when i install visual studio 2015. When i tried to modify the visual studio it didn't let me install web development tool (Update button was disabled). So i tried an alternative solution install asp.net core https://www.microsoft.com/net/core#windows because i know it comes with web development tool so i just tried installing and it fixed my issue.
I am trying to run a website which has a mix of classic ASP and ASP.Net files along with lots of VB dlls used from the asp scripts. The site is setup and running correctly using IIS7 in Windows 7 professional machine. In order to setup debugging using Visual Studio 2013, I was following the instructions in the following SO post and installed IISExpress 8.0 to setup debugging. But whenever I am trying to attach the iisexpress.exe process hosting my site from the VS Attach to Process window selecting Script code, it is throwing an error and suggesting the VS installation as corrupted. Screenshot shown below:
Seems like a 32/64 bit issue but could not figure out exactly where is the incompatibility and how to fix it. Any help would be greatly appreciated.
There's a Microsoft Connect issue regarding the "corrupt installation (code 0x80040154)" error. It's for VS 2012 but maybe you're running into the same issue even though you have VS 2013, in which case simply repairing VS does not fix the problem.
The OP of the Connect issue said that he fixed the problem by completely uninstalling VS and removing all remnants of it, then reinstalling VS. The steps are:
Uninstall Visual Studio.
Remove these keys from the registry:
Visual Studio 2012:
HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0
HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0_Config
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0_Config
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config
Visual Studio 2013:
HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\12.0
HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\12.0_Config
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0_Config
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config
Remove these directories:
Visual Studio 2012:
C:\ProgramData\Microsoft\VisualStudio\11.0
C:\Program Files (x86)\Microsoft Visual Studio 11.0
C:\Users\UserName\Documents\Visual Studio 2012
C:\Users\UserName\AppData\Local\Microsoft\VisualStudio\11.0
C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\11.0
Visual Studio 2013:
C:\ProgramData\Microsoft\VisualStudio\12.0
C:\Program Files (x86)\Microsoft Visual Studio 12.0
C:\Users\UserName\Documents\Visual Studio 2013
C:\Users\UserName\AppData\Local\Microsoft\VisualStudio\12.0
C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\12.0
Restart the computer.
Reinstall Visual Studio.
(I read elsewhere on the internet that it could be related to 32/64 bit incompatibilities, and perhaps that is the true cause in your case, but I'm inclined to think that VS got corrupted when you installed IIS Express.)
http://i.stack.imgur.com/k5fN5.jpg
I can't create a new ASP.NET Web Project via template. Clicking on "OK" crashes VS 2013 or shows the error message "Object reference not set to an instance of an object".
I'm using MS Windows 8.1 + Visual Studio 2013 Premium Update 3.
Extensions I am using:
.NET Reflector Pro
Brace Completer
Visual Power Tools
Web Essentials 2013 for Update 3
Maybe someone knows whats going on? I am running VS 2013 as admin. :(
I tried disabling all Extension, doesn't help.
It's a fresh install from MSDN.
Edit:
I just recognized that the templates show up, when I choose a .NET framework below 4.5:
http://i.imgur.com/rK6AzNR.jpg
EDIT 2:
Okay, reinstalling didn't help. I also uninstalled everything .NET related.
Okay I found the Problem.
in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies are three assemblies that prevent VS 2013 from showing up the assemblies. See this Question/Answer:
Can't create new MVC5 project or any other ASP .NET projects in Visual Studio 2013
I am trying to open the Direct3D Tutorial Win32 Samples with VS 2013 Express for Windows Desktop. To my surprise it claims that the individuals projects in the solution each cannot be opened because their project types (.vcxproj) are not supported by this version of the application.
Does anyone know why the vcxproj files cannot be opened, or how I could diagnose and repair the root cause of the problem?
Edit: I can also not open the vcxproj files in Mike Farnsworth's Rayito project.
It means that the projects were created in another version of Visual Studio.
Try to upgrade the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting Upgrade Solution.
Alternatively you could use Visual Studio 2012 Express Edition to see if that resolves the problem.
Windows Dev Center indicates that Visual Studio 2012 is required.
Hope this helps
Neither of the other answers seemed to help.
I uninstalled visual studio. I uninstalled SQL server. I reinstalled visual studio. Now it loads C++ projects correctly.
I understand a previous install of visual studio can cause the problem I was having. Apparently so can installing SQL server Express prior to installing Visual Studio 2013 Express.
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.