I am using latest version on resharper (v9 Update 1) on a asp.net mvc project in VS 2013. For some reason, resharper is not able to provide/highlight non existing actions in razor view. Previously it used to show an error and then provided a menu to generate the action (screenshot below).
I have tried repairing and reinstalling the resharper. Even devenv /resetsettings command to open Visual Studio did not help. How to get this feature back?
Either downgrade MVC packages to 5.2.2 or install Resharper EAP 9.1
See the issue https://youtrack.jetbrains.com/issue/RSRP-433112
Related
I've been through a lot of similar issues, but could not find anything that worked for me.
I'm upgrading my IDE from the VisualStudio for Web (v10) to Visual Studio 2015 (v14, I guess) Community Edition.
The main project that I'm trying to use on the new IDE is a MVC 5 (5.2.3), with EF 6.1 (6.1.3) and a bunch of other stuff.
Problem is: When opening the project on the new IDE, everything looks fine (it even compiles and work). I got the MVC context menu working on the project explorer (showing the "Add Controller..." and "Add View..." when appropriate). Only (really annoying) thing is the Razor Intellisense.
When I do open a View file (.cshtml) I receive warnings on several helpers, some of the "using" are greyed out (even though they're supposed to be needed) and the #model myModel is shown like everything after the #model directive is not razor (it's treated like HTML by the intellisense coloring).
What I've already found and tried:
I've already tried to clear the UserData from the vs (devenv /ResetUserData)
I've already tried to run the VS2015 in safe mode
I've already tried to run VS2015 as Administrator
I've already tried to set the Project's target framework to 4.5.1 (used to be 4.5)
I've already tried to open the project on Visual Studio Community 2013 saving it there before trying to use it on VS2015.
When creating another MVC project from the VS2015, everything works fine.
Here's an example of the annoying issue:
Ok, finally got it.
Posting what I found out believing it may help someone else:
What seems to cause the problem mentioned is the fact that the project was created on an old MVC version (with older Razor, EF, etc).
As stated in this answer: Visual Studio 2015 Razor View MVC Types not recognized, VS2015 tools may not work for older MVCs.
The solution is to update all your packages to [at least] the minor versions accepted on newer MVC (5?). To do so you can use the list in this website: http://www.asp.net/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2.
Once everything is up-to-date, open the web.config files located on root of your application and on the Views folder. In there, you will probably find some references to the older versions of MVC and Razor. Update those versions values (all of them) to match the updated versions of your packages (you may create a new empty MVC project on the new Visual Studio and check for those values as a hint of what they should be).
This step is the catch! Since, even if you update you project's packages, some web.config references may still mention the original versions.
Clean the solution (Build > Clean Solution) and close the project. Reopen and compile it. Now [hopefully] everything should be working fine.
[Edit]
One more thing: If your project was also updated from Framework 4.5 to 4.5.1 during this IDE transition, you should also install a NuGet package called "Microsoft.CodeDom.Providers.DotNetCompilerPlatform" (as stated in https://support.microsoft.com/en-us/kb/3025133).
I recently upgraded to Resharper 8.1 and VS 2013
Before I could ctrl+click on a View to jump to it, but this no longer works. Is there a feature I need to enable to get it back?
PartialView("_MainMenu", viewModel);
Go to Resharper->Manage Extensions and click the Online tab. Then search for Resharper.ExternalAnnotations, and install the package it comes up with.
Finally go to Visual Studio Tools->Options and go to the Resharper->General options page. Click Suspend Now followed by Resume to restart Resharper.
About workaround for previous versions of ReSharper:
You can download package with annotations https://resharper-plugins.jetbrains.com/api/v2/package/ReSharper.ExternalAnnotations/8.1.1000.431 and unpack content of ReSharper\vAny\annotations\ folder to C:\Program Files (x86)\JetBrains\ReSharper\vX.Y\Bin\ExternalAnnotations, where X.Y is your version of ReSharper.
Better first to clean target folder up to avoid annotations duplicates.
ReSharper 8.2.1 (8.2.1000.4556) doesn't support MVC 5.2
EAP for 8.2 is closed
Bug registered
UPDATE:
FIXED: reply about fix from the Resharper team
You need to restart the VS and you will get notification about Update or run it manually from the Resharper => Extension Manager => Updates => Resharper.ExternalAnnotations (like in the Samuel answer)
There still seems to be an issue with ReSharper and navigating to MVC Views or having the QuickFix (Alt+Enter) functionality available on them in the latest (as of this writing) version of ReSharper - v8.2.3000.5176.
My MVC version is 5.2. My ReSharper version is 8.2.3000.5176. When I installed this it seemed to install the ExternalAnnotations that come bundled with the update, also versioned at the same version number.
I can fix the issue by uninstalling the ExternalAnnotations (version 8.2.3000.5176) and re-installing the latest version offered from the ReSharper Gallery (which is version 8.2.2001.1). After a Visual Studio restart, my MVC quick-fixes and View navigation is back.
Strangely, I also get prompted by ReSharper that extension updates are available, and it wants to upgrade my ExternalAnnotations to version 8.2.3000.5176. If I do this (and restart VS) everything breaks again. Downgrading back to version 8.2.2001.1 (and a VS restart) will, however, fix it again.
A number of other people are also reporting this issue on JetBrain's ReSharper blog post that announced ReSharper 8.2.3
So, if you're using MVC 5.2.x and ReSharper 8.2.3, try to downgrade the version of the ExternalAnnotations that you're using and see if that solves the issue.
UPDATE (5th November 2014):
There is now a new version of the ReSharper External Annotations available from the JetBrains "ReSharper Gallery". This new version is v8.2.3001 and I can confirm that once installed, this new version fixes the problem for me!
ReSharper 8.1 just doesn't support MVC 5.1
Latest EAP builds of ReSharper 8.1.1 do.
There should be no problems with running your ctrl+click and no additional configuration (enabling/disabling anything) should be needed. So it is most probably some bug.
Your situation might be connected with the following known issue reported here. It is connected with IntelliSense, not with Resharper directly, but they are both related to problems with navigating in Razor engine when having VS 2013 and newest ASP.NET MVC.
Below the summary of the issue description and some workaround to fix it:
MVC 5.1 Tooling Support and Razor IntelliSense are Still Broken Even
After Installing VS2013 Update 1 RC
Known issue:
If a VS2013 user installed “Microsoft ASP.NET and Web Tools 2013.1 for
Visual Studio 2013” before they install VS2013 Update 1 RC, they won’t
be able to get MVC 5.1 tooling support that comes with VS2013 Update 1
RC.
Symptom:
MVC 5.1 tooling support and Razor IntelliSense are still broken even
after installing VS2013 Update 1 RC.
Workaround:
From "Add/Remove Program", uninstall "Microsoft ASP.NET and Web Tools
2013.1 for Visual Studio 2013" Repair VS2013 RTM Install VS2013 update 1 RC if you have not yet installed it. If you have already installed
this, you don’t need to reinstall or repair it. From Web PI, reinstall
Microsoft ASP.NET and Web Tools 2013.1 for Visual Studio 2013 or
repair Azure SDK 2.2.
try ctrl+B while cursor some where on the View()
I'm trying to open MVC project using VS2010.
I'm opening this project from TFS server but I'm failed to open it
and getting error :
The project type is not supported by this installation.
please help.
You basically don't have something installed. That's why you get this error. I am very sure that you need to install the VS MVC project type - either MVC 2 or MVC 3. Use The Web Plaform Installer to install. The web platform installer can be found here: http://www.microsoft.com/web/downloads/platform.aspx. Once you have installed it (it is only 2MB) you need to search for "MVC", install the MVC 2 and MVC 3 project templates.
I got this error when I forgot to select the Web Developer feature in the Visual Studio setup. Unfortunately, the error you mentioned is the only error you get when Visual Studio 2010 is installed without this feature. You can install the Web Developer feature using the Windows control panel.
By popular demand (7+ and counting), I'm placing part of CodingWithSpike's comment here. Specifically, the procedure to explicitly add Visual Web Designer to VS install.
open Control Panel
select Programs and Features (or Add/Remove Programs)
choose Visual Studio
click "Uninstall/Change"
this opens the VS installer in maintenance mode.
Click "Next" once
Click "Add or Remove Features"
Checkbox "Visual Web Designer"
click Update button.
Enjoy having a working product!
Edit the project.csproj file and look at the <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
The GUIDS above includes MVC 3 Tools Update. That's a good guess of what you are missing. You can get MVC 3/TU from http://www.asp.net/mvc/mvc3
BTW, that install includes VS2010 SP1 which is required for the TU edition.
If you've installed Visual Studio 2010 after Visual Studio Web Dev Express and MVC4, Visual Studio 2010 doesn't seem to pick up the MVC 4 templates. Running the MVC 4 installer again via the Web Platform Installer doesn't fix it. Repairing the MVC 4 installation fixed it in my case:
Under Control Panel, choose Programs/Uninstall a program.
Find Microsoft ASP.NET MVC 4 and double-click it.
The Microsoft ASP.NET MVC 4 Setup prompt will appear. Choose Repair.
Visual Studio 2010 Express to Pro, ASP.NET MVC 4 installed but not an option?
in my case, i had opened my VS2010 solution, in vs2012, i was getting the project type is not supported, tried re installing mvc3 as was suggested, cancelled re installation, then i had the issue i couldn't open the project in VS2010 anymore. then tried to re install mcv3 again. solution was, uninstall mcv3, uninstall mcv4, then reinstall mcv3, then i could reopen my project in VS2010 . hope this helps someone!
I have been working with visual studio 2010 Premium RTM for over a month. When I installed it I had a fresh install of windows. (No betas or previous versions of VS)
I have been creating new ASP.NET MVC2 C# projects since I installed it. I went to create a new mvc project today and I don't have that as an option anymore. I went in under the new project section not the new website section. I don't see it listed under C# or VB.
Is there a way to get that back without reinstalling visual studio?
I had this problem with Linq to SQL templates. Try the accepted answer on this other stack overflow question.
The solution was to run
devenv.exe /InstallVSTemplates
to reinstall the templates. It worked for me when I had missing templates in Visual Studio 2010.
After installing ASP.net MVC, when I attempt to load a existing or a new MVC application (straight from New Project - A project for creating an application using the ASP.NET MVC framework (1.0) (.NET Framework 3.5)) I get the following error:
Microsoft Visual Studio
The project file 'path' cannot be opened.
The project type is not supported by this installation.
OK Help
Tried reinstalling which didn't help. Tried devenv /setup which also didn't help.
Any ideas?
The reason was because I didn't have the Visual Web Development part of VS installed. I only had the C# language. As such, MVC didn't check and installed successfully but couldn't use the underlying part.
After installing the Web Dev bit everything worked as expected...
You could also try to run the following command:
devenv /ResetSkipPkgs
This will try to load any Visual Studio packages that failed previously at some point, such as the WPF project flavor package, which would cause the error message you're seeing.
Not sure if this is the same issue but going through the uninstall and re-install of beta and RC versions and finally the RTW I ended up with two ASP.NET MVC Web Application icons in my "File/New/Project" dialog.
If I click the first link, my project does not load correctly. But if I click the second one everythign works great.
I haven't dug into the templates folder to see if there is a remnant from a previous version or what.
Brian
Did you install SP1 for .Net and VS2008?
The way I corrected this issue of not being able to open a ASP.NET MVC 1.0 for myself goes like this when I was using VS 2008
Install SP1 for VS 2008
Install MVC 2.0 framework
I realized I had an MVC 1.0 project and I used this tool to change the project to MVC 2.0.
The tool works great, props to Eilon Lipton never met the guy but I'm down with anyone that will make my life easier.
http://weblogs.asp.net/leftslipper/archive/2009/10/19/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2.aspx