can any one precisely explain the difference between ASP.NET MVC1 vs MVC2.. and if i'm having a project in MVC1, how can i migrate it to MVC2 ?
MVC 2 is a later version of the same library.
To upgrade to it, read this page.
There is a conversion utility, see here: http://weblogs.asp.net/leftslipper/archive/2010/03/10/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2-rtm.aspx
Related
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
I would like to update my project from:
ASP.NET MVC 2 with Entity Framework 4.
to
ASP.NET MVC 4 and Entity Framework 4.1
How can this be done?
You may take a look at the ASP.NET MVC 4.0 release notes which explain how to upgrade from an ASP.NET MVC 3 application. And the release notes of ASP.NET MVC 3.0 explain how to upgrade from ASP.NET MVC 2.
As far as upgrading from EF 4.0 to EF 4.1, it's as simple as updating the assembly reference. Of course if you wanted to do Code First approach you will have to make more extensive modifications.
Instead of doing it manually which will indeed take a lot of effort....why not check out my answer to a similar question and use ASP.NET MVC 3 Application Upgrader to go from MVC2 -> MVC3 and UpgradeMvc3ToMvc4 to go from MVC3 -> MVC4.
I've decided to take the suggestion from Robert Harvey on this site and build an application using ASP.Net MVC.
When I went to Bing for a brief overview, I saw there was an MVC2.
What is the difference and should I care?
MVC2 is backwards compatible with MVC, so MVC2 is the one you will be using.
For the new features in version 2, see here:
http://weblogs.asp.net/scottgu/archive/2010/03/11/asp-net-mvc-2-released.aspx
Just use MVC v2 if you have the option. It is an evolved version of MVC 1 with many useful enhancement. See ASP.NET MVC 2 Released for more info.
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
Where do you get Microsoft.Web.Mvc.dll? I see it included in a lot of ASP.NET MVC open-source projects but it's not on my system after having installed ASP.NET MVC Beta and .NET 3.5 SP1.
In the ASP.NET MVC Beta source code from codeplex.com the Microsoft.Web.Mvc.dll is produced by the MvcFutures project. Is everyone compiling this module themselves?
EDIT: now that I know what it's called I see where Scott Gu mentions it in his release notes: ASP.NET MVC Futures Assembly
That's the MVC Futures project.
MVC 1.0 Futures:
http://aspnet.codeplex.com/releases/view/24471
MVC 2 Futures:
http://aspnet.codeplex.com/releases/view/41742
MVC 3 Futures:
http://aspnet.codeplex.com/releases/view/58781
Looks like this is the final 1.0 version !
ASP.NET MVC v1.0 Futures
application, 104K, uploaded Mar 12
The above page has been moved to http://aspnet.codeplex.com/releases/view/24471. From there download the Data Annotations Model Binder Sample. Then compile it and build it.
For anyone who might still be looking for this many years later (to revive an old bit of source code, for example, as I was), there are now Nuget packages for the various versions of MVC Futures (which gives you access to the Microsoft.Web.Mvc namespace).
They are imaginatively named, after the version of MVC they belong with:
Mvc2Futures
Mvc3Futures
Mvc4Futures
...apart from the MVC 5 one, which is called
Microsoft.AspNet.Mvc.Futures
IIRC, it was already built and included.
For ASP.NET MVC RC1 the new address is
http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=22359
Tak a look at this blog. It highlights areas of the MVC Future
http://msmvps.com/blogs/luisabreu/archive/tags/MVC/default.aspx
You have to download the Data Annotations Model Binder Sample at http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471 . Then compile and build the project.