It seems I cannot upgrade my ASP.NET MVC v1 project to be able to open it in Visual Studio 2010. Anyone noticed that already?
"The project type is not supported by this installation."
??
edit...I actually want to upgrade it to ASP.NET MVC v2 if possible. If not, I will probably create a new ASP.NET MVC v2 project and copy the files there and then try to build.
Can't seem to get it why there are no replies yet, didn't anyone try this out yet?
To upgrade an existing ASP.NET MVC 1.0 application to version 2, follow these steps:
Make a backup of the existing project.
Open the project file in a text editor (the file with the .csproj or .vbproj file extension) and find the ProjectTypeGuid element.
As the value of that element, replace the GUID {603c0e0b-db56-11dc-be95-000d561079b0} with {F85E285D-A4E0-4152-9332-AB1D724D3325}.
When you are done, the value of that element should be as follows:
{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
For additional steps read this.
Related
When I try to open an existing solution (to ultimately convert it to later MVC and .NET packages), VS2015 rejects the project:
The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=E53F8FEA-EAE0-44A6-8774-FFD645390401
That link is worthless as it takes me to a VS2013 compatibility page.
My goal is to migrate the project from MVC3/.NET4.0 to MVC5/.NET4.5.
I can't target a later MVC or .NET in VS2010. VS2015 won't open the older project so the solution here won't work Some (official or not) upgrade Mvc3 to Mvc5 guide?? for changing the properties of the project since the project won't open.
Mvc3 is not supported after VS2010.Iuse VS2010SP1.
You may make it work but it will bite you in the end.
You have to choose the VS version and the corresponding Mvc version
I went into the csproj file manually and switched the ProjectTypeGuid to that of an MVC4 project: E3E379DF-F4C6-4180-9B81-6769533ABE47. Then VS2015 was able to open the project and it upgraded it to MVC5 guid correctly.
I recently inherited some source code developed by someone else who is no longer with the company. However, the solution file was missing and I'm not even sure which version of MVC it was using. I'm experienced with ASP.NET, but not well-versed in MVC so I'm unsure how to go about rebuilding the solution the proper way. Looking for any tips/guidance on how to go about this.
Create a new, blank solution.
Open the solution in Windows Explorer.
Copy the project files into the solution folder.
Within Visual Studio, right-click the solution in Solution Explorer, and then chose the option to Add Existing Project....
Navigate to the solution folder (if necessary), and then select the .csproj (or .vbproj) file. The project will added into the solution.
Now, whether you can compile the solution/project depends on whether the version of MVC is compatible with the tooling installed in your instance of Visual Studio. If the project has NuGet dependencies, they should be restored the first time you build, depending (again) on your version of Visual Studio and tooling.
Edited:
Since you say that even the project file is missing, you can, assuming there are no external dependencies, create a new MVC project and then copy/paste the files into it (or drag & drop the files from Windows Explorer). Assuming there is a Views folder, it will have it's own web.config file. That config file will have bindings for the version of MVC the project was developed with.
MVC4 and newer projects tended to default to using Razor syntax, so the views will be littered with stuff like #Model. If it's using the older WebForms syntax (like <asp:ContentPlaceholder>), it's probably MVC3 or older.
Go to web.config file in the project and look for:
assembly="System.Web.Mvc,Version=3.0.0.0 ..."
In this example is.MVC 3, look for your version
I've got an old project from a friend that he wants me to do redo. How ever that project is written in ASP.net mvc2. So When I try to open it in visual studio 2013 I can errors. Saying the file is incompatible. How would I go ahead and fix this?
I would highly recommend you to create a new empty MVC 5 project, and move all your files there from old MVC 2 project. If you just try to update DLLs its very hard be sure if you updated all DLLs, proj file, nugets, or at least little bit more work by copying files is well worth it. Problem is that VS2013 is not compatible with old version of MVC framework.
But, if you really want to open MVC 2 solution in VS2013, you can try following some steps described here: How do I open an old MVC project in Visual Studio 2012 or Visual Studio 2013? (contains a project Guid that needs to be changed inside .proj file)
I wanted to download this sample http://mvctimeplanner.codeplex.com/
The author did not attach solution file only the project(all source files inside the project folder).
How to create solution from those files?
EDIT
Also it is ASP .NET MVC 2 project, and the oldest I got is ASP .NET MVC 4 and I use ASP .NET MVC 5.1 so running failed.
Is there a similar demo which I can just download and run to see how it works? I looked for a while month ago and now and I cannot find one.
You should open that folder as a website by going to File > Open > Website in Visual Studio
For your other question, you should check this answer.
I have made a relatively simple change to the MVC 1.0 source code to correct a bug in the DropDownList HtmlHelper (discussed in another question).
I was able to rebuild the MVC solution, ran all the tests, including the one I hadd added to show the bug I was fixing, and built a new DLL.
But how do I use that?
I tried moving the new MVC dll into the project and changing all the project references to point to it, but when I try to run the MVC website, it's throwing an exception saying there's a conflict between my version of MVC and the MVC in the GAC.
I tried to use gacutil.exe to remove the one from the GAC, but it says it can't do that because it would make another program (the Microsoft Installer? fail.
What do I have to do to install my newly built version in place of the "official" version?
If you want to remove it from the GAC without uninstalling MVC (which includes the Visual Studio templates you probably need), you need to do this in the registry:
Find registry key HKEY_CLASSES_ROOT\Installer\Assemblies\Global and look for key starting with System.Web.Mvc – delete it
Now you should be able to use gacutil.exe to remove System.Web.Mvc from the GAC, and you should be able to use your version from your /bin folder.
How about changing the version number when you compile the modified MVC framework?