I am currently using ASP.NET MVC1 in my project but now i am planing to move on ASP.NET MVC2.
What are the changes i need to do in my project to change MVC version? just need to change System.Web.MVC dll with MVC 2 dll or any other changes i required?
This is the release post on Scott Gu's Blog: http://weblogs.asp.net/scottgu/archive/2010/03/11/asp-net-mvc-2-released.aspx
This tool performs all the re-referencing for you:
http://weblogs.asp.net/leftslipper/archive/2010/03/10/migrating-asp-net-mvc-1-0-applications-to-asp-net-mvc-2-rtm.aspx
You might also want to grab the release notes off there MSDN download page: http://www.microsoft.com/downloads/details.aspx?FamilyID=c9ba1fe1-3ba8-439a-9e21-def90a8615a9&displaylang=en
There are a couple of breaking changes to watch out for.
The easiest is to follow instructions from here http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes/ If this doesn't work for whatever reason, describe the problem here...
Related
maybe my question is stupid, but can i build my own project with ASP.NET MVC assemblies from this source code?
I want set the break points and study the code step by step.
Yes. Obviously you can. No problem.
Of course, but the link is ASP.NET MVC 3. The latest version is MVC 4
Is there a sample application using MVC3 with Razor, something similar to the NerdDinner website where I can review the source code?
Looks like NerdDinner has been updated for MVC3 according to the CodePlex changeset in August `11.
Check out the MVC3 Music Store
Check for MVC Music Store MVC MusicStore, but check for the lastest committed versions, as the last committed version have some problems.
Check for tampaDev site. Tampadev.org mvc3 samples
Codeplex tagged projects Codeplex Asp.net mvc3
Refer the book "Pro ASP.Net MVC3 Framework" By Adam Freeman and Steven Sanderson. They are clearly explaining MVC3 Pattern, its language features and essential tools for MVC3. In addition, it demonstrates step by step development of a sample sport store application with source code.
There's a really good stuff I think in Applied ASP.NET 4 In Context http://www.amazon.com/Applied-ASP-NET-Context-Adam-Freeman/dp/1430234679. There's an example ASP.NET MVC application!
Good luck!
I need to upgrade an application that runs on ASP.NET MVC 1 to ASP.NET MVC 4.
The new application still uses the Webforms Viewengine. It uses StructureMap for Dependency Injection.
If possible I would like to upgrade manually.
For upgrading from ASP.NET 1 to ASP.NET 2 I found the white paper
http://www.asp.net/whitepapers/aspnet-mvc2-upgrade-notes
The steps described in the document seem to be of little risk:
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
What about upgrading to MVC 4: Will there be different steps involved?
You would follow a similar set of steps to upgrade to MVC 4. Microsoft has a whitepaper that outlines the steps required to manually upgrade a project from MVC 3 to MVC 4.
I have upgraded from 3 to 4 following these steps and it was a pretty simple and smooth process. Going from 1 to 4 is a bigger jump of course, so to minimize headaches you might want to individually upgrade 1->2, 2->3, 3->4: if you run into any breaking code changes it will be easier to identify how to resolve them. But fundamentally, all you're really doing is changing project GUIDs and referencing newer DLLs and such. It's not brain surgery.
To answer Ashok's question, MVC 4 is certainly deployable if you wish to use it today - my public blog is running it (on my own server). Use preview software at your own risk, of course.
My understanding is that MVC 4 is still in developer preview so a lot of features may and likely will change when the RC version is release. Since it is in dev preview is it even deployable as a live site?
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.