ASP.NET MVC Source Code Now Available

Last month I blogged about our ASP.NET MVC Roadmap.  Two weeks ago we shipped the ASP.NET Preview 2 Release.  Phil Haack from the ASP.NET team published a good blog post about the release here.  Scott Hanselman has created a bunch of great ASP.NET MVC tutorial videos that you can watch to learn more about it here.

One of the things I mentioned in my MVC roadmap post was that we would be publishing the source code for the ASP.NET MVC Framework, and enable it to be easily built, debugged, and patched (so that you can work around any bugs you encounter without having to wait for the next preview refresh release).

Today we opened up a new ASP.NET CodePlex project that we'll be using to share buildable source for multiple upcoming ASP.NET releases.  You can now directly download buildable source and project files for the ASP.NET MVC Preview 2 release here.

Building the ASP.NET MVC Framework

You can download a .zip file containing the source code for the ASP.NET MVC Framework for the release page here.  When you extract the .zip file you can drill into its "MVC" sub-folder to find a VS 2008 solution file for the project: 

Double-clicking it will open the MVC project containing the MVC source within VS 2008:

When you do a build it will compile the project and output a System.Web.Mvc.dll assembly under a \bin directory at the top of the .zip directory.  You can then copy this assembly into a project or application and use it.

Note: the license doesn't enable you to redistribute your custom binary version of ASP.NET MVC (we want to avoid having multiple incompatible ASP.NET MVC versions floating around and colliding with each other).  But it does enable you to make fixes to the code, rebuild it, and avoid getting blocked by an interim bug you can't work around.

Next Steps

Our plans are to release regular drops of the source code going forward.  We'll release source updates every time we do official preview drops.  We will also release interim source refreshes in between the preview drops if you want to be able to track and build the source more frequently.

We are also hoping to ship our unit test suite for ASP.NET MVC in the future as well (right now we use an internal mocking framework within our tests, and we are still doing some work to refactor this dependency before shipping them as well).

Hope this helps,



  • Sweet. Can't wait for mvc 1.0. :-)

  • Need tutorials with VS Express integration.

  • Great! Keep it up guys!

  • MVC is looking promising for our needs. Do you have any plans to introduce support for asynchronous processing?

  • Scott, I know we're not going to nail you down on a release date, but do you have kind of ball park month/quarter for us?

  • woot. excellent.

    Why did you not release the source for System.Web.Routing?

  • awesome, great. Would this be possible for dynamic data or other "around the edges" technologies also?


  • Scott,

    This is awesome. I love the move to transparency. I especially like how Microsoft is making unit tests available for both the MVC project and the Silverlight controls. I find that one challenge when people first approach unit tests, even if they understand and accept the concept, is translating theory into practice (at least my team and I did years ago). Making such a wealth of examples from MS should only enhance the unit test ecosystem in the entire .net stack.


  • This is great. As a .NET programmer I sometimes wonder if switching to an open source framework is a better choice for me and for the company I work for, and I am still seriously considering it. But I do like .NET and C# a lot, so the more source and general openness the better.

  • Thank you for releasing the source code! I am looking for regular drops of the source code - nightly builds (that is probably unlikely to happen)? Is your internal mocking framework any good? Why not release that too ;-)

    I had a question about why some of the tag builder classes such as HtmlExtensionUtility and TagBuilder are internal? As I have built some of my own extensions it seems like I have to redo some of the effort that is built into these classes.

  • There's a lot of middle ground between "source available" and "can't ship a modified binary". Can we, say, blog code snippets of bug fixes that we find? Post entire source files with those fixes included? Some clarity about what we can and can't do would be helpful.

    Or maybe it's all in the license, which I haven't actually read yet. :)

  • Will the source code for the final release be available under the same terms(i.e. modifications allowed but no redistributing)?

  • will you provide test cases?

  • No! No! I don't need it! Take it away! I have something else planned for this weekend! I have no use for this! It is not important to me!

  • Where are the unit tests? I thought I heard Hanselman say at Mix that they had something like 90%+ code coverage in the unit tests for the framework. That'd be pretty awesome to see.

  • Hi Scott,

    This is great - Having a look through the project I noticed the dependent assemblies shipped with it - Are there any plans to expand availability to System.Web.Routing?


  • I'm really interested in ASP.MVC, but I cannot see much about this technology being used to implement Web Services, REST or SOPA/WCF based ?
    What are MS Plans to support WCF with ASP.MVC ?

    I note that RAILS only supports REST services by default.



  • Good work Scott!! Miguel (de Icaza) was right about you and your team "changing Microsoft from the inside out". ;)

  • Cheers Scott,

    This is what I call a birthday present!!

    Great work again.

  • thanks, looking forward ASP.NET MVC 1.0 svn edition :)

  • Whoopdedo! Just what we need. Another MVC framework. What are you going to do to differentiate yourselves from the other MVC frameworks already out there? I'm not seeing what all the buzz is about.

  • Hi Scott,

    Step 1: Create a Site.Master template

    To begin with we can create a new root master page file that we'll use to define the overall layout and structure for all pages on the site. We'll name this file "Site.Master" and copy/paste the "outer chrome" HTML from the template we downloaded into it.
    We'll then add a into the content section in the middle where we'll fill in page specific content. We'll name this control "MainContent":

    I have downloaded the template. What do you mean by copy/patse the "outer chrome" ???

    Regards, Johann


  • Great News for DotNet to use the MVC DP. So, now for j2ee developper, they can work with both DotNet and J2ee with the same basic architecture.
    Thanks for the news

  • Pingback from Microsoft ASP.NET 3.5 MVC Source Code Now Available | Harry Soetardjo

  • hi, I am a win 2000 pro user with vc6.0++ , do you have a demo project , for this kind of users?

    actually most of the c/c++ developers I know use win 2000 pro with vc6.0++ , since it is light simple and most efficient.
    the SDK platform supply a grate c++ substitusion for vb.NET and C#. is there somthing for ASP.NET as well???

  • hi i love this article.

  • Scott,

    About Web Client Software Factory (WCSF) MVP pattern and ASP.NET MVC: They will to merge/converge? Who will be incorporated to ASP.NET?

  • Hi Scott,
    Looking in future should we be using Web Client Software factory which implements the MVC or this new idea on the block?

    I would like to ask, In case in six months time someone else gets another good idea to "develop" (like I use the web client factory) can I have a conversion tool to migrate to MVC?

    Deepak Chawla

  • Thanks for posting. I was looking forward to it.

  • Gonna have to try this :). Thanks for the heads up

  • Gonna have to look it up. Thanks for the head's up

  • Great news. :)
    Hi, Scott, I want to use MVC in our new project, but the version is Preview 2. When the final version be released, is there any critical risk for update?

  • [The Issue]
    - Everything works fine on development computer. Time to test it on a development server. Server is Microsoft 2003, using iis 6.0. Route handling is set to include “.mvc”. “.mvc” is added in both the MIME types, and in the virtual directory configuration for the website. The problem is that navigating to a page brings up the “page not found 404” error.
    [Something Interesting]
    - After checking a dozen times or so that the “.mvc” extension is added properly to iis. If I change the routing to use “.ashx” instead of “.mvc” (because they use the same .dll), the routing works.
    [The reason]
    - After discovering that another extension that uses the same dll worked, I next had to figure out what was the difference between these two inside the metabase.xml. This is what I discovered:


    - Note the difference between these lines. .mvc has a “5” where .ashx has a “1”. Changing the 5 to a 1 resolved the issue, and now I can use .mvc extensions in my routing.


    - Would you know why and for what purpose these 5-1 flags are? It appears iis doesn’t have any controls that deal with this flag. You only deal with extension, path to dll, and the verbs.
    - Was I correct in simply changing the xml instead of doing something from within iis.
    - Does this fix deserve to be added to your blog? If so, I’m happy to contribute!!

  • Great article. I'm starting to learn and use this MVC framework with VS.

Comments have been disabled for this content.