We have a very old legacy system which was developed using MVC1 through Visual Studio. Since then , Visual Studio also evolved and so has MVC.
Now we want to make our MVC1 project compliant with MVC5. Is there any, ready made tool available for this?
Various forums suggest to gradually move the project from MVC1 to MVC2, then from MVC2 to MVC3 and so on.
But I was not able to find any way of converting from MVC1 to MVC2. Although the information regarding the same is still available, but the tool to convert MVC1 to MVC2 is not found.
Can any one please throw some light on this?
You can use the old version of ASP.NET Project upgrade tool as the limitation is
The tool does not support Visual Studio 2008 solutions, MVC 1 projects, or projects targeting .NET 3.5. If you have a MVC 1.0 project you can use the old version of this tool to convert it to MVC 2.
You can also manually upgrade to MVC 3
The white paper steps for upgrading MVC1.0 to MVC2.0 are
Fiddle with web.csproj
Replace Version=1.0.0.0 in web.config by Version=2.0.0.0
Reference System.Web.Mvc (v2.0.0.0) in the project
chnange bindingRedirect in web.config
update css and js files
Related
Is there a way to convert a ASP.Net MVC 1 project build in VS2008 to ASP.Net MVC 5 and VS2015?
I tried to just open it in VS 2015 but that gave the error "This project is incompatible with the current version of Visual Studio".
There are ways to reference newer versions and update, eg:
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
.. however updating from MVC1 (especially if you cannot open the project) you probably don't want to manually install ASP.NET MVC installs etc (if that what I remember)
I would suggest creating a new MVC5 application, referencing MVC via Nuget etc and pulling in code as required. This will give you a chance to re-structure things and learn newer ways otherwise you my be fighting with MVC configuration and references.
After upgrading my .net mvc project to 5.2.3, it does not have nice features like validating view/action names and linking to them.
here are my project type guids
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
which should mean web application + C# and probably is correct
I have Microsoft Visual Studio Ultimate 2013 Version 12.0.31101.00 Update 4
.net version is 4.5.51641
and tools which are probably related
ASP.NET and Web Tools 12.4.51016.0
ASP.NET Web Frameworks and Tools 2012.2 4.1.21001.0
ASP.NET Web Frameworks and Tools 2013 5.2.21010.0
do i need some additional extension or is there some secret project guid for mvc 5.2.3?
Try uninstalling the package. Then clean the solution and reinstall it again.
it turned out to be a resharper issue
https://youtrack.jetbrains.com/issue/RSRP-433112
have been using this tool for so long it seemed natural to have this kind of intellisense and started to blame visual studio.
Opening MVC2 Projects just makes "project not supported" error on visual studio, and i can't find the template for creating new projects for mvc2.
I undertand that the mvc2 new project template could be not desired after installing mvc3, but the support for editing and maitaining mvc2 projects should still be there.
in the release notes it states:
ASP.NET MVC 3 can be installed side by
side with ASP.NET MVC 2 on the same
computer, which gives you flexibility
in choosing when to upgrade an ASP.NET
MVC 2 application to ASP.NET MVC 3
I know I have mvc1, mvc2 and mvc3 dlls "side by side" on my GAC, but i'm still hoping this visual studio error is a error in my setup.
If not, ¿Is possible to upgrade the project file and keep all contents the same, pointing to the mvc2 dll?
To answer my own question after a few attempts:
Yes, it is possible to upgrade the project without altering MVC2. Just apply step 8 of the manual migration procedure on the release notes for MVC3:
8- Locate the ProjectTypeGuids element and replace
{F85E285D-A4E0-4152-9332-AB1D724D3325}
with
{E53F8FEA-EAE0-44A6-8774-FFD645390401}.
and reload the project.
This should be all.
The downside is that if other people are working on this project, they will now need to install MVC3 too, in order to get Visual Studio to recognize this new project GUID.
We have an ASP.Net MVC 1.0 solution developed using Visual Studio 2008 and .net Framework 3.5SP1.
We would now like to upgrade Visual Studio to 2010.
If we just open the solution in VS 2010 and do not change the framework version, can we just continue to develop as before?
If we open the solution in VS 2010 and change the framework version to 4.0, will we automatically start using ASP.Net MVC 2.0, or will it continue to use ASP.Net MVC 1.0?
Is there anything we need to take into consideration when upgrading to ASP.Net MVC 2.0?
Thanks
Shiraz
Yes.
I don't know if this is supported, but I wouldn't go there. It would make more sense to update to MVC 2 first, then .NET 4.
Yes, lots. Look at the release notes on CodePlex. Many things have changed, including model binding, TempData handling, and the return types of HTML helpers. These are breaking changes. There's a wizard which tries to help, but you're going to have to fix some of this manually.
It will continue using ASP.NET 1.0 unless you run the tool to upgrade to 2.0. If I am not mistaken, all the tool does is update your web.config to point all MVC references to 2.0 instead of 1.0
I have a visual studio project which is an ASP.NET MVC project, however it doesn't recognize it as such in Visual Studio so I don't get the nice dropdowns with Add View and such. Rather I just get a very plain add file dialog which doesn't include any MVC file templates. When I create a new MVC project however I get all the nice little VS tools. So, can someone tell me how I can instruct VS to recognize the project as an MVC project?
Thanks
For ASP.Net MVC 3, you will have to change the ProjectTypeGuids property in the project file to:
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
Well, to answer my own question, you have to change the projecttypeguids in the project file. In the case of ASP.NET MVC RC1 they are:
{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
Though of course these may vary depending on the version you're targeting.