After installing Update 4 for VS 2013, I immediately started getting the message
This project is incompatible with the current version of Visual Studio
when I try to open all my MVC projects.
I've tried following advice on older posts, such as changing the version of visual studio, and checking for other updates, but none have worked.
I am using Visual Studio Premium 2013 and have .Net 4.5. It happens to projects that target both 4.0 and 4.5.
This is happening with MVC projects, but it does not happen when opening a simple project containing only .cs files.
Repairing Visual Studio turned out to be the solution.
I believe the initial update was unsuccessful because the C drive was low on space. Clearing up space, and repairing both .Net 4.5.1 and Visual Studio did the trick.
Related
I just installed the .Net Core 3.0 SDK (both 64 and 32 bit version) and yet, the .Net Standard 2.1 Targeting Pack is not shown in Visual Studio's list. It is going up until 2.0 only. What am I doing wrong?
Apologizing. The problem is that I had to update visual studio.
Interestingly enough, I had Visual Studio open for several hours, and even though an update existed, it didn't prompt me to update, leaving me with the impression that it was already in the most recent version.
I had to run Visual Studio Installer manually to request for an update
I've been trying to install VS 2015 Enterprise edition on my computer but keep running into an issue. Hunting through SO for the last 24 hours, I've already tried the devenv.exe /ResetUserData & clearing the VS cache fixes, uninstalling enterprise edition and installing professional edition (which still failed for the same reason) and then reinstalling enterprise edition. I've tried deleting the .vs folder before opening the solution, ensuring that the MVC versions in the /Views/ web.config matches the version of the sites web.config (MVC 5.2.3.0).
As of this morning, I've noticed that it only crashes when I try to open a razor view that wasn't created through Visual Studio 2015 (I was using VS 2012 previously, and I'm trying to work on this project in 2015 now that I have a license). I can right-click in the solution explorer to create a brand new view and write anything I want in it with intellisense and save it, and open it back up without any issues.
I get the whole "An exception has occurred, this may be caused by an extension" message and then visual studio restarts if I try to open up a view that was already created through VS 2012.
I've tried looking inside of the log that it provides but I'm a newer developer so I can't really deduce anything from it..I'll attach it if anyone else can make anything of it.
MS VS Enterprise 2015 - Version 14.0.25029.00 Update 2 RC - .NET Framework Version 4.6.01055
I just cleared out the ActivityLog.XML and forced the error to get a fresh set of details - http://pastebin.com/j7RbGJFP
I found the answer in this blog post - https://blogs.msdn.microsoft.com/webdev/2016/01/12/visual-studio-keeps-showing-suggested-extensions/. It has to do with the extensions suggestion - it turns out if you have files not included in your project, you can't view them because of a bug introduced through the extensions suggestion. If you turn that off and include the views in the project, VS won't crash and you'll have intellisense.
I have (just reinstalled) Visual Studio 2013 Professional (on Win 8.1) to try and fix this: If I try to create a new Web Project, for either .Net 4.5 or 4.5.1, then I see the screen below.
If I try to open an existing MVC 5 website (one I've just created through that wizard on another machine) - then it works just fine.
Equally, if I set the target framework to 4 then I get the previous MVC 4 template appear, and that works.
If I look in the Microsoft Visual Studio 12.0\Common7\IDE\ProjectTemplates\Web\CSharp\1033\ folder then I see WebApplication45 which appears to contain the content that this project template uses - so why is it broken!?
The machine did use to have VS2012 on it, and I notice that in the list of installed products for 2013 it has 'ASP.Net Web Frameworks and Tools 2012.2' - which I believe is a VS 2012 thing. So I'm wondering if that's interfering with it. But there's nothing on my Add/Remove programmes for this, so I don't know how to uninstall it!
Any help greatly appreciated before I throw my screen through the window :)
Please try the following:
Close VS, open Explorer and go to C:\Program Files (x86)\Microsoft Visual
Studio 12.0\Common7\IDE\PrivateAssemblies
Delete the following assemblies if they exist:
Microsoft.VisualStudio.Web.WindowsAzure.Contracts.dll
Microsoft.VisualStudio.Web.WindowsAzure.Explorer.dll
Microsoft.VisualStudio.Web.Internal.Contracts.dll
Restart VS
In Tools > Extensions and Updates:
Update to lates VS2013 update (it is Update 3 now)
Install if not installed Microsoft ASP.NET and Web Tools
Install if not installed ASP.NET Web Forms MVC 4
Install if not installed MS VS ASP.NET MVC 5 Scaffolding
I solved it by removing all programs connected with .Net development and SQL (just being really cutthroat) - not just Visual Studio; going down my installed programs list from top to bottom:
Visual Studio 2013, obviously
All .Net Framework SDKs and Language Targeting Packs
All Azure tools SDKs (some start with 'Azure', one starts 'Windows Azure')
All SQL Server stuff - possibly too much, but I didn't need them outside of VS
IIS Express
I then rebooted and deleted all remaining Microsoft Visual Studio folders (I had v10, 11 and 12) from Program Files (x86) and all remaining SQL Server folders. SQL is also in the x64 program files, and that's used legitimately by the OS, so might want to skip that one.
I then rebooted again and reinstalled 2013 with Update 3 - and now the new project dialog works as expected.
It's most likely the removal of just one of those things that fixed it (my money is on clearing down the VS folders).
I fixed this by deleting these files from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies:
Microsoft.VisualStudio.Web.WindowsAzure.Contracts.dll
Microsoft.VisualStudio.Web.WindowsAzure.Explorer.dll
Microsoft.VisualStudio.Web.Internal.Contracts.dll
(based on http://blogs.msdn.com/b/bharry/archive/2014/08/04/vs-tfs-2013-3-update-3-released.aspx#10550199).
I have an old ASP.NET MVC 2 project which I do not want to upgrade to MVC 3 or MVC 4. I am working on a new machine running Windows 8, Visual Studio 2012 and Visual Studio 2013. When I try to open the MVC 2 project in VS 2012 or VS 2013 I receive the error:
This project is incompatible with the current edition of Visual Studio
The project is then unloaded and grayed out in Solution Explorer. I do not want to install another copy of Visual Studio. How can I open an old MVC project in a new version of Visual Studio?
Opening an unsupported MVC project in Visual Studio 2012 or Visual Studio 2013 is actually pretty easy to accomplish with two steps. In fact, as bytebender’s comment indicates, these same steps should apply to and work for MVC 1 projects. However, I haven’t tested them and therefore cannot guarantee that they do in fact work.
Assuming that you have not already done so step one is to download and install MVC 1, MVC 2 or MVC 3 (close Visual Studio before starting the installation).
Once you have the appropriate flavor of MVC installed the project will still not load in VS 2012. This is because ASP.NET MVC projects are a project subtype of the Web Application project type. This means that the project has additional add ins and features available to it when used within Visual Studio.
Both Visual Studio 2012 and Visual Studio 2013 are limited in their backwards compatibility with ASP.NET MVC and other project types. Unfortunately, installing the old MVC bits did not change that. Visual Studio 2012 is compatible with the ASP.NET MVC 3 and 4 project flavors. Visual Studio 2013 is compatible with MVC 4 and MVC 5.
To get the project to load you will have to modify the project file. To do so right click on the unloaded project and select Edit. Which will open the project file as an XML text file. Find the ProjectTypeGuids node which should look something like this:
<ProjectTypeGuids>
{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
Remove the appropriate Project Guid from the list:
ASP.NET MVC 1: {603c0e0b-db56-11dc-be95-000d561079b0}
ASP.NET MVC 2: {F85E285D-A4E0-4152-9332-AB1D724D3325} (shown in example above)
ASP.NET MVC 3: {E53F8FEA-EAE0-44A6-8774-FFD645390401}
ASP.NET MVC 4: {E3E379DF-F4C6-4180-9B81-6769533ABE47}
With the appropriate GUID removed the ProjectTypeGuids should look similar to this:
<ProjectTypeGuids>
{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
Save the file and close the Visual Studio project file editor. Right click the project and select reload. If the project does not reload close and reopen Visual Studio. You should now be able to work with your old ASP.NET MVC project in your new version of Visual Studio.
One important thing to note is that after these modifications Visual Studio is not aware that this is an ASP.NET MVC project; therefore the project-specific features like "Add Controller, View etc." will not be present in menus.
I used #ahsteele's approach (thanks and 2x+1s!), but was having one further error:-
.csproj : error : The operation could not be completed. Invalid class string
I can't find any citations for the real cause of that, but I was able to get VS2012RTM to load the project successfully by changing the <ProjectGuid>. (No idea how this happened - its part of a large solution and VS08, VS10, VS11 Beta and VS2012RC have all upgraded the .csproj and .sln over time.
In VS2017 the solution is to just make it like <ProjectTypeGuids></ProjectTypeGuids> so.
No Spaces in between ladies and gentlemen, otherwise it will waste 48 hours of your time.
Regards
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.