cannot be opened. The project type is not supported by this installation - asp.net-mvc

.cs project file
The project was created using Visual Studio 2010 and I am trying to open it in Visual Studio 2010 itself but still I am facing this problem.
I have opened this project in VS 2012 and worked for few days but it has created in Visual studio 2010. Is there anything which preserve the project details on local machine?
This is the specific project section in my solution file:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project Name", "Project Name\project name.csproj", "{48C1190E-7700-461B-ADCD-B5E0F1ECAD21}"
ProjectSection(ProjectDependencies) = postProject
{1F5440B3-9FD8-4FE2-B621-8697489ABDC4} = {1F5440B3-9FD8-4FE2-B621-8697489ABDC4}
EndProjectSection
EndProject

In Visual Studio it is possible to add Project Types, e.g. for creating an MSI, by installing an Add-On to the development machine. It appears that in the past this was done, and then that new Project Type was used to add a Project to the Solution. But now you are opening the Solution on a machine that does not have that new Project Type.
Look for the GUID of the missing Project Type, it should be part of the error you are getting. Then google "project type {the-guid}" to see which Add-On you need to install on your development machine.
It is also possible that a new Project Type was used in the Solution that simply can not work with VS 2010. In that case your options are either to keep using VS2012, or to start over with a new Solution in VS2010 and migrate the projects into it that are compatible (which may be a bit tricky or hard to do if VS2012 saved them).

Would it be too difficult to just recreate the project and include all the necessary files and references? Once the project was saved from VS 2012, the format may have broken compatibility with 2010. Sometimes this is fixable just by updating the version number in the project file, but I don't see it in your image.

Related

New Asp.Net Project Template Dialog is empty

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).

How to make a project work both in VS 2010 and VS 2013?

There is an ongoing project that is based on ASP NET MVC 1 and used Visual studio 2010 IDE.
I'm newly joined this project. I want to use Visual studio 2013 IDE for this prject while other developers use 2010 IDE. According to my research to achieve this goal I made some modification on csproj file. Initial and changed lines are the following:
original line:
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
modified line
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
According to above changes I successfully run it on VS2013. After I checked in new csproj file on TFS, other developers couldn't open project in their IDE VS2010 as expectedly. So in a correct manner, how can I change csproj to use both VS2010 and VS2013 IDEs?
As far as I know, this is not possible.
The only way would be to refrain from checking in the project file, but then it could become tricky if you have "legitimate" modifications to check in.
The general rule is to have a standardized development platform for developers on the same project. Otherwise you end up with this kind of problem.
So basically, either upgrade everyone to VS2013 or stick to VS2010.

this template attempted to load component assembly Microsoft.VisualStudio.Web.Project

I just installed Visual Studio 2013 Ultimate trial version for completing the MVC5 tutorial by Rick Anderson, which worht doing it.
The tutorial: http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started.
However, I created a blank solution first and then try to add an ASP.Net Application project, which is going to be my MVC5 tutorial project. And I got this weird message:
Error: this template attempted to load component assembly
'Microsoft.VisualStudio.Web.Project, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. For more information on this problem
and how to enable this template, please see documentation on
Customizing Project Templates.
But I´m not customizing, I´m just creating a project out of a built in template.
Do you know how can I solve it?
Here is the solution:
In Visual Studio 2013, select Tools > Extensions and Updates
Check for updates. You should have the Azure SDK update available.
Download and install the Azure SDK. After this, everything should work fine.
If your updates are not turned on, enable your auto detection of updates in Tools > Options > Environment > Extensions.
If you have unspecified error related to E_fail(code), try this:
When creating a new MVC 5 application, change the framework version from 4.5.1 to 4.5, if that did not work change it to 4. Check the below image if it is not clear.
Another approach:
This is really important if you are installing Visual Studio 2013 on un-updated Windows 7.
there reason i am calling out "not updated is",
The reason that 'un-updated' matters is because Visual studio 2013 does not update the powershell that is required by VS2013 for most of the stuff.
The simple solution is to update Powershell to the latest version.
If you are not sure how to update powershell, you can use this tutorial.
So I stumbled upon this issue as well and would like to share how I was able to resolve this problem.
Tools -> Extensions and Updates -> Online -> NGet Package Manager: Click the download button once you have the NGet Package Manager selected. Make sure to restart your Visual Studio after you have downloaded the Manager.
This should do the trick
Close Visual Studio, run the VS executable with the command line option as shown below (you will likely have to supply the full path), and relaunch VS normally. This should re-initialize the templates, including the one that you are having problems with.
devenv.exe /installvstemplates
So I faced the same problem with Visual Studio 2013, and I don't know what's the problem but it appears that it only occurs when creating a new project, and choosing "Web" from the panel.
What I did was simply clicking on "Visual Studio 2012" just below it, and it worked !

Will VS2012 work with TFS2010?

I'm considering using VS2012 RC to put together coded UI tests (since VS2010 SP2 FP2 does not fully support IE9).
Currently, my test projects are contained within a solution which is connected to our TFS team project. I also set up a build definition to build the project when new code is checked in (the builds are performed on our build machine).
I suppose that if I upgrade my solution to VS2012, then to be able to build the solution on the build machine I will need VS2012 RC installed there too, right? But then is it possible to specify in my build definition for my project to be built by VS2012 instead of VS2010?
Is it possible for me to upgrade my project with VS2012 while still using TFS2010? I should note my solution will be the only one upgraded to VS2012. All the other solutions in the company still need to be built by VS2010. A company-wide upgrade to VS2012 won't be in place for at least a few months, I imagine.
Or do I need a separate build machine or anything?
Any thoughts, ideas or solutions appreciated!
UPDATE: So I gave it a try, and everything worked okay. My only problem is that the Coded UI tests I have didn't work after being re-built on on my build machine, but I suppose that's probably something I'd need to ask about elsewhere. To clarify, the solution built successfully, but the tests still failed.
Visual Studio 2012's project changes allow most types to still be opened by Visual Studio 2010 with SP1, so it depends on what kind of projects are in your solution - see this page for the full compatibility list:
If you created your assets in Visual Studio 2010 with Service Pack 1
(SP1), many of them will load and run in Visual Studio 2012 without
any further action on your part. Many assets will also open again in
Visual Studio 2010 with SP1 without any issues, even after you open
those assets in Visual Studio 2012.
See also "Round-tripping with Visual Studio 11" on the VS blog which has more detail.
Note though that if your build process uses custom build activities then just installing Visual Studio 2012 breaks the build definition on your local machine, and also that MVC1 or MVC2 projects just aren't supported by VS2012. Oh, and Visual Studio 2012 isn't a RC any more, it was RTM'd last week.
(I presume you mean 2012 RTM rather than RC, now that the final release is available)
Theoretically (from what I've read) VS2012 and VS2010 use the same project/solution file format, so you should be able to switch between them without any compatibility issues (aside, presumably from obvious things like creating new file types that VS2010 doesn't understand)
TFS updates have historically been backwards compatible, so you can usually use different client and server versions (but usually you need a compatibility pack installed for old clients on new servers, a new client running against an old server has usualyl been fine). So I'd expect this to work well.
I'd say try it, but diff any files that appear in VCS2012's Pending Changes carefully before you check in to be sure that it hasn't changed anything that will cause problems. The worst that can happen then is that your development machine gets a "corrupt" version of the code and you'll need to revert to 2010.
(This is the approach I've been using with our 130-project C# solution, and so far (1 day) it's working fine, apart from the new UI making my eyes bleed as they try to find the information in all the indistinguishable monochrome clutter)

migrate a asp.net mvc solution file from 2010 back to 2008

i did an upgrade and it caused lots of problems. unfortunately i didn't back it up. Is there anyway i can convert a 2010 solution file back into asp.net mvc 2008?
Make a backup of what's left of what you currently have before doing this ...
Create a new solution in Visual Studio 2008. Create new projects for the 2008 solution. Use the project menu or right-click the project and choose "Add Existing Items..." Choose all the code files .cs .vb, etc from your 2010 structure and include them in the 2008 structure.
Basically you're copying all the code back into a 2008 structure with the 2008 formatted project and solution files. The code shouldn't be substantially changed beyond repair. You might have to manually address some issues in the converted code but once you know what they are it will be a repetitive process more than anything.
If you are writing code of any importance you should be using a version control system like as SVN. I haven't tried Visual Studio 2010 yet, but can tell you from experience that the differences between 2005 and 2008 are laughably small. You can down convert a 2008 solution file by manually changing the first two lines from:
Microsoft Visual Studio Solution File, Format Version 10.00
Visual Studio 2008
to
Microsoft Visual Studio Solution File, Format Version 9.00
Visual Studio 2005
the project files are fairly trivial as well with the product tag changing from:
9.0.21022
to
8.0.50727
Please note the changes I have listed for project files may not be 100% accurate and I have not tested for differences between service pack releases. However, creating a new project in an earlier version of Visual studio, making a copy and then doing an upgrade should allow you to run a diff and provide a better answer than what is currently accepted.

Resources