ASP.NET MVC, Web API, Razor and Open Source

Microsoft has made the source code of ASP.NET MVC available under an open source license since the first V1 release. We’ve also integrated a number of great open source technologies into the product, and now ship jQuery, jQuery UI, jQuery Mobile, jQuery Validation, Modernizr.js, NuGet, Knockout.js and JSON.NET as part of it.

I’m very excited to announce today that we will also release the source code for ASP.NET Web API and ASP.NET Web Pages (aka Razor) under an open source license (Apache 2.0), and that we will increase the development transparency of all three projects by hosting their code repositories on CodePlex (using the new Git support announced last week). Doing so will enable a more open development model where everyone in the community will be able to engage and provide feedback on code checkins, bug-fixes, new feature development, and build and test the products on a daily basis using the most up-to-date version of the source code and tests.

We will also for the first time allow developers outside of Microsoft to submit patches and code contributions that the Microsoft development team will review for potential inclusion in the products. We announced a similar open development approach with the Windows Azure SDK last December, and have found it to be a great way to build an even tighter feedback loop with developers – and ultimately deliver even better products as a result.

Very importantly - ASP.NET MVC, Web API and Razor will continue to be fully supported Microsoft products that ship both standalone as well as part of Visual Studio (the same as they do today). They will also continue to be staffed by the same Microsoft developers that build them today (in fact, we have more Microsoft developers working on the ASP.NET team now than ever before). Our goal with today’s announcement is to increase the feedback loop on the products even more, and allow us to deliver even better products. We are really excited about the improvements this will bring.

Learn More

The Git repository on the site is the live RC milestone development tree that the team has been working on the last several weeks, and the tree contains both the runtime sources + tests, and is buildable and testable by anyone. Because the binaries produced are bin-deployable, this allows you to compile your own builds and try product updates out as soon as they are checked-in.

You can also now contribute directly to the development of the products by reviewing and sending feedback on code checkins, submitting bugs and helping us verify fixes as they are checked in, suggesting and giving feedback on new features as they are implemented, as well as by submitting code fixes or code contributions of your own. Note that all code submissions will be rigorously reviewed and tested by the ASP.NET MVC Team, and only those that meet an extremely high bar for both quality and design/roadmap appropriateness will be merged into the source.

Summary

All of us on the team are really excited about today’s announcement – it has been something we’ve been working toward for many years. The tighter feedback loop is going to enable us to build even better products, and take ASP.NET to the next level in terms of innovation and customer focus.

This is amazing. One of the things about being on the leading edge is working your way through new technologies without a sufficient set of accumulated knowledge on the web. I encountered an issue recently with how Common.Logging interacted with ApiController in a Unity DI environment. Having the source will greatly accelerate the learning and feedback process. Thanks!

It is really awesome to see Microsoft doing this. Congratulations on making this happen. I can't imagine the number of meetings it took to get to this point. Again, great work to the entire team. Excuse me, I need to read some code ...

It is awesome that the ASP.NET MVC, Web API, and ASP.NET Web Pages (aka Razor) bits are being made available by Microsoft under an open source license and development model. Is it possible that ASP.NET WebForms will also be released under this same model in the future?

This is just awesome news! It's just special to see all the cool stuff getting rolled out of the doors nowadays at Microsoft: Git on codeplex, Orchard went open source and now also MVC and related stuff. Cool!

Hi Scott,
I remember around 6 years ago the source code of the whole of the .NET Framework, including Windows Forms and WPF, was made available under a shared source license model, , i.e. you could look at the code but not modify or redistribute it. That sounded at the time to be an excellent project, both for learning by reading the code but most importantly by helping you debug your applications. However, the downloadable package with the code never arrived from what I remember and the Visual Studio integration was not easy to set up. After some months, the whole idea seemed to have been shut down or discontinued or at least forgotten. Could you tell us what is the status of that project? It would be amaizing if you can revive it or at least explain what happened to it?

What's your idea about forking this codebase? What happens if Microsoft is going to use Codeplex like it uses Connect: ignore everything as "by design" and the community decides to fork the project(s). In the case that the most popular fork is not Microsoft's, the products are going to be out of sync. Then you have lost the ability to strategically build your 'precious' tooling around ASP.NET.

As I understand, your division is supposed to be making something like 2 billion USD on tools. Will you go all defensive and maintain your own fork as THE official source for ASP.NET 5+ releases, or will you embrace a more popular fork and either a) stop focussing on tools so much or b) build tools that target the new reality?

Very interested in your thoughts, hope you can be open about this aspect as well!

MVC, Razor, WebApi, KnockoutJS what else does a developer need, nothing. Looking back just several months everything was relatively new and didn't quite fit together, but now it all fits perfectly because you and your team did a hard and amazing work for all of us out there. Regards.

Can someone tell the SSRS team so they can develop a report viewer that works on Razor? I'm glad they can get kinnect working with the current one but embedding iframes and aspx pages is making our intranet site act very strange at time.

Wouldn't it make more sense to host this on GitHub or BitBucket?
Their online tooling is far better than Codeplex and the pool of registered developers is greater. If the goal is to have more eyes on the source, it would make sense to host with a more popular service.

Rob : >>Is there any chance we will see ASP.NET Web Forms released under this same model?
See Scott Hanselmans blog http://www.hanselman.com/blog/ASPNETMVC4ASPNETWebAPIAndASPNETWebPagesV2RazorNowAllOpenSourceWithContributions.aspx where he writes Why isn’t ASP.NET Web Forms open sourced?

Congratulations to your and your team. The open sourcing is exciting, but the key here for developers like myself (working for State/County municipal organizations) is that these products continue to be supported by Microsoft. Government agencies are usually very scared of open-source products, and quite often go the Microsoft route because of such support contracts rather than Linux/Apache+Ruby/Rails, or the Node camp. Thanks for the leap forward without any leaps back. -T

Now, if you would only stop using 5 or more different languages to do the same thing we can do in WPF or Silverlight with one. Get real guys. Why do we have to use html, javascript, c#, json, etc just to get a good user interface for the web? PLEASE COME UP WITH A BETTER WAY.

is there anybody can tell me? i have some problem in asp.net
i wanna to make an empty grid view without a database and then insertion of radiobutton in that gridview using textbox value and on a button click

Congrats! It's a huge step in a right direction, I'm glad I was there during the announcement at Dev Connections. Also great work on WebAPI and move to create exciting new technologies that will help us create SPA applications. Nice to see Microsoft being on the cutting edge!

So, not github because ms doesn't want to let go of the codeplex platform?

Github is superior in many ways, and super active, if ms wants to show dedication to open source then why not go with the best tools out there, even if not owned by ms? Maybe it's a bit much to ask in the first place, but open-source really is the future when it comes to web development. Github already got an ex-ms'er phil haack on board, and other hot projects hosted like nancy.

I was there when Scott hit that button live on stage in Vegas. Awesome atmosphere, and the keynote speech with the three Scotts from Microsoft was as hilarious as it was informative. Really enjoyed it and felt very fortunate to have been there to experience it!

This is great. Now if only Microsoft would do this for other projects such as Entity Framework and .NET as a whole. I have long thought that the .NET source code should be included with Visual Studio. The same way the Java source code is included with the JDK and easily browsable and debuggable in IDEs such as NetBeans. This is one area where I think Java is still better. I agree with what someone else said about how Microsoft published the source to the .NET Framework a few years ago, but, it basically died off and I'm not sure that they've updated it. I would like to see it be much easier to debug apps and step into the framework source code and not have to using something like .NET Reflector. I think it will also be great to be able to follow projects and get the fixes as they are implemented. I did notice that if you go to http://entityframework.codeplex.com that it says that the projects isn't yet published as opposed to just not found. So, maybe that's another project they are planning to open source soon.

I have make one mcq online test application which is web based. I found one big problem and I have no more time in deadline in this project. Any one please give me guidance in my beloved problem.

I have developed above app. in webbased, with .NET 3.5 with C# and SQL Server 2008. I found one big problem, that I could not use the Maths Equations which are made by MathType Software
in my Editor control. Even I couldn't use Ms-Word Equations in my Editor control in asp.net
application please guide me. I have use Telerik Editor control as well as Ajax Editor Control.

I got so excited about this, i got the code and was able to hit the magic first break point on the extensions method for MapRoute, which internal just creates a Route object......am i missing something but my download did not include the source for System.Web.Routing.....so following a debug all the way to the browser does not seem possible.....

Since MVC4 was given to the OS community, I wasn't able to find any material related to how to create ASP.NET MVC4 Project templates in VS. I'm new to ASP.NET MVC and I was actually counting on a project template to start with.
Anything I could find about this it's related to Beta or CP and the installer was doing the magic.

I got so excited about this, i got the code and was able to hit the magic first break point on the extensions method for MapRoute, which internal just creates a Route object......am i missing something but my download did not include the source for System.Web.Routing.....so following a debug all the way to the browser does not seem possible.....
thanks a lot!

Hello sir i hav made a web application project in c# asp.net and m using sql server for database management.and i hav my own server space and i want to host this website at server but i doesn't know how to do i hav installed IIS7 but not know about how to deploy my website for which i can easly host my website at server so give me step by step information as soon as possible at my email durgeshkrjha@gmail.com
regards Durgesh Jha

I got so excited about this, i got the code and was able to hit the magic first break point on the extensions method for MapRoute, which internal just creates a Route object......am i missing something but my download did not include the source for System.Web.Routing.....so following a debug all the way to the browser does not seem possible.....

Why do you force people to go through MVC4 to create a Web API project? I don't get the logic. Also, Why does it create a project with no solution file. I don't want to use MVC4, or any asp.net front end but rather HTML5 with jquery and other JS libraries. Please think about divorcing Web API from MVC4 and just having a standalone/first class Web API project.

This is just awesome news! It's just special to see all the cool stuff getting rolled out of the doors nowadays at Microsoft: Git on codeplex, Orchard went open source and now also MVC and related stuff. Cool!