build my own project with ASP.NET MVC assemblies - asp.net-mvc

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

Related

Upgrading ASP.NET MVC1 project to ASP.NET MVC4

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?

Migrating Project from ASP.NET MVC1 to ASP.NET MVC2

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

Asp.net - MVC1 vs MVC2

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

Convert Visual Studio project to ASP.NET MVC

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.

Where to get Microsoft.Web.Mvc.dll

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.

Resources