ASP.NET MVC 2 and Visual Studio 2010

asp.net, asp.net mvc, code 0 comments suggest edit

When we released ASP.NET MVC 2 Beta back in November, I addressed the issue of support for Visual Studio 2010 Beta 2.

Unfortunately, because Visual Studio 2010 Beta 2 and ASP.NET MVC 2 Beta share components which are currently not in sync, running ASP.NET MVC 2 Beta on VS10 Beta 2 is not supported.

The release candidate for ASP.NET MVC 2 does not change the situation, but I wasn’t as clear as I could have been about what the situation is exactly. In this post, I hope to clear up the confusion (and hopefully not add any more new confusion) and explain what is and isn’t supported and why that’s the case.

why

Part of the confusion may lie in the fact that ASP.NET MVC 2 consists of two components, the runtime and what we call “Tooling”. The runtime is simply the System.Web.Mvc.dll which contains the framework code which you would reference and deploy as part of your ASP.NET MVC application.

The Tooling consists of the installer, the project templates, and all the features in Visual Studio such as the Add View and Add Area dialogs. Much as ASP.NET 4 is different from Visual Studio 2010, the ASP.NET MVC 2 tooling is different from the runtime. The difference is that we primarily release both components in one package.

The reason I bring this up is to point out that when I said that ASP.NET MVC 2 RC is not supported on machines with Visual Studio 2010 Beta 2, I’m really referring to the tooling.

The ASP.NET MVC 2 RC runtime is fully supported with the ASP.NET 4 runtime. As I mentioned before, we are not compiling a different version of the runtime for ASP.NET 4. It’s the same runtime. So you can create an ASP.NET empty web application project, for example, add in the RC of System.Web.Mvc.dll as a reference, and go to town.

The problem of course is that you won’t have the full tooling experience at your disposal in VS2010 such as project templates and dialogs. This is definitely a pain point and very unfortunate.

Why don’t we ship updated installers for Visual Studio 2010 Beta 2?

This is a fair question. What it comes down to is that this would add a lot of extra work for our small team, and we’re already working hard to release the core features we have planned for this release.

Add this extra work and something would have to give. It would have to come at the cost of feature work and bug fixes and we felt those were a higher priority than temporary support for interim releases of VS2010.

Why would this add overhead? Eilon Lipton, lead developer on the ASP.NET MVC feature team, covers this well in his comment on my last post.

Regarding Visual Studio 2010 and .NET 4 support, that is unfortunately not a feasible option. The most recent public release of VS2010 and .NET 4 is Beta 2. However, our internal builds of MVC 2 for VS2010 and .NET 4 depend on features that were available only after Beta 2. In other words, if we released what we have right now for VS2010 and .NET 4 then it wouldn’t even run.

We are constantly syncing our internal builds with the latest builds of Visual Studio 2010. As Eilon points out, to support VS 10 Beta 2, we’d have to have two separate builds for VS10, one for Beta 2 and one for the latest internal build. Keep in mind, this is on top of the build for Visual Studio 2008 we’re doing.

Trying to sync our tooling against two different versions of Visual Studio is hard enough. Doing it against three makes it much more difficult.

As I mentioned before, the ASP.NET MVC 2 project schedule isn’t aligned with the Visual Studio 2010 schedule exactly. Heck, when ASP.NET MVC 1.0 was shipped, work on VS 10 was already underway, so we were playing catch-up to catch the VS 10 ship train. Thus when the Beta 2 was code complete, we weren’t done with our Beta. When we were done with Beta, we were already building our tools against a newer build of VS10. The same thing applies to the RC.

What about Visual Studio 2010 RC?

Funny thing is, since I’ve been on leave, I pretty much found out that we were even having a public Release Candidate for Visual Studio 2010 the same time you probably did via ScottGu’s Blog post on the subject.

The good news is that the Visual Studio 2010 Release Candidate will include a newer version of ASP.NET MVC 2. We’re still working out the details of which exact version we will include, though I’d really like it to be the RC of ASP.NET MVC, assuming the logistics and schedule line up properly.

And of course, the Visual Studio 2010 RTM will include the ASP.NET MVC 2 RTM and at that point, all will be well with the world as installing tooling for ASP.NET MVC 2 will be supported on both VS 2008 and VS 2010 at the same time.

So again, we do understand this is an unfortunate situation and apologize for the inconvenience this may cause some of you. Aftor all, I feel the same pain! I want to install both versions on my machine just like you do. Fortunately, it’s only a temporary situation and will all be a bad memory when VS2010 RTM is released to the world. Thanks for listening.

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.

Comments

avatar

25 responses

  1. Avatar for Colin Bowern
    Colin Bowern December 19th, 2009

    Is the tooling GAC'd? I'm curious why the tooling doesn't go into the VS2008 folder and leave the VS2010 stuff alone so at least we can run it side-by-side (VS2010 with beta bits, VS2008 with RC bits).

  2. Avatar for TJB
    TJB December 19th, 2009

    Great post to clarify the situation and let us peer into the development cycle of the MVC team.
    One real concern though, by not having the tooling included in any of the betas aren't you losing valuable testing / customer feedback on the tooling itself? This is assuming that there are new features & changes to the tooling for this release.

  3. Avatar for Brad Wilson
    Brad Wilson December 19th, 2009

    @TJB,
    The tooling for MVC 2 Beta and RC are getting tested by users who are using VS 2008.
    The actual content inside the templates are different for VS 2008 and VS 2010, because the project files have changed (as they do with every version of Visual Studio). The actual functionality of the tooling is identical in VS 2008 and VS 2010.

  4. Avatar for Brad Wilson
    Brad Wilson December 19th, 2009

    @Colin,
    Yes, the tooling is GAC'd. That's not really the problem.
    The problem is that the tooling is matched to a specific build of MVC. And you cannot support side-by-side MVC 2 builds (you can support SxS with 1.0 and 2, but not multiple builds of 2).
    So, if you install 2008 and 2010, and then install MVC 2 Beta or RC, you may be breaking 2010's MVC tooling, because the DLLs won't be matched against each other any more. It may or may not work, but if it's broken, you're on your own.

  5. Avatar for S
    S December 19th, 2009

    I just success to convert ASP.NET MVC 2 RC source code to .NET 4 and use it as referenced project in my project in VS 2010 Beta 2. However, you must add the following code to ignore security rule that always be fired.

    [assembly: System.Security.SecurityRules(System.Security.SecurityRuleSet.Level1)]

  6. Avatar for Emad Mokhtar
    Emad Mokhtar December 19th, 2009

    Hello Phil,
    This post not only add unfortunate situation, it's add more and more exiting situation in waiting VS 2010 to release; I'm counting days, I hope it pass fast.
    Best Regards,
    Emad Mokhtar

  7. Avatar for Firefly
    Firefly December 19th, 2009

    Great job as always Phil, thanks for keeping us updated.
    Since we are on the subject of tooling, there is a minor annoyance that annoy me to no end with the AddView window.
    Current there is no filter for type when you want to add a strong type view. That mean that list is long and fragile as well (Sometimes it won't display all the type). Since it's most likely that most of the view type will reside in one project, in my case they all derive from a base ViewType.
    So may I suggest that we add two Filter, one by project and the other by base type? And VS will remember the filter next time the Add View window is Invoke.
    Of course if a user don't enter a filter it will list everything by default.

  8. Avatar for Douglas Starnes
    Douglas Starnes December 19th, 2009

    This clarified something that I thought was probably the case. I assume that the source for ASP.NET MVC 2 RC does not contain the source for the tooling otherwise it would be released instead of having the user compile it. Though it might be extra work, creating an empty MVC project and adding in the guts by hand would be a great educational exercise to learn the internals of the framework.

  9. Avatar for Colin Bowern
    Colin Bowern December 19th, 2009

    @Brad - ah, okay. I was thinking that if it wasn't GAC'd (i.e. in the PrivateAssemblies folder in the VS folder) that you could surgically replace only the VS2008 instance of the tooling rather than both. That way you could support VS2008 running a newer build. I guess as they say "good things come to those who wait" or rather "install VS2010 in a VM for now". :)

  10. Avatar for BuzzBox
    BuzzBox December 19th, 2009

    Or we can structure and work with MVC2 RC project in VS2008 and just compile it against all the other project elements in a VS2010B2 with added microsoft.mvc.dll. :)
    That should work.

  11. Avatar for Gene
    Gene December 19th, 2009

    Just to clarify your clarification, Visual Studio 2010 Beta 2 has an ASP.NET MVC 2 Web Application Project as one of its Template types.
    Which version of MVC is this?

  12. Avatar for haacked
    haacked December 20th, 2009

    @Gene, the one that's currently in Visual Studio 2010 Beta 2 is ASP.NET MVC 2 Preview 2.

  13. Avatar for farrio
    farrio December 20th, 2009

    Hopefully in VS2010 RC we can see MVC 2 RTM.

  14. Avatar for Jack
    Jack December 20th, 2009

    Great!
    Combined with jQuery, MVC is my best choice developing websites.

  15. Avatar for Thanigainathan
    Thanigainathan December 20th, 2009

    Nice article sir.
    Thanks,
    Thani

  16. Avatar for jsonmez
    jsonmez December 20th, 2009

    Thanks, you just saved me some trouble. I just installed both on a Virtual PC at home and was about to start playing around with MVC 2 tonight. If I installed VS2008 side by side on that virtual PC should that cause any problem you can think of? I wanted to use VS2010 to do some silverlight 3, and 08 to do MVC 2 at this point.

  17. Avatar for bastien
    bastien December 20th, 2009

    Does the ASP.net MVC support being used in the Visual Web Developer tools?

  18. Avatar for Tomasz Jaskula
    Tomasz Jaskula December 21st, 2009

    Hello,
    As I understand there is no real need to start with VS 2010. I'll start with VS 2008 and migrate to VS2010 with release of the RC.
    Through your post I read that there is some black vodoo magic done for some features in .NET 4.0. Are there many other features of MVC 2 that are supported only in VS2010 ? I would like to be defintely sur which version of VS to use.
    Thanks

  19. Avatar for Jason Tipp
    Jason Tipp December 21st, 2009

    Can't wait to see new VS. 2010 version will include (I hope) many useful tools to use. Sometimes the first look brings a conclusion that new version is not so revolutionary to resign from using the old one but I think that after some time of working with the new application, all the new includes will be appreciated.

  20. Avatar for VitaminJeff™
    VitaminJeff™ December 21st, 2009

    Thanks for clearing that up Phil. Keep up the great work and HAPPY HOLIDAYS! :D

  21. Avatar for Steve
    Steve December 21st, 2009

    I'm curious now about what efforts have gone into providing better tooling options in VS 2010.
    Truthfully, the only tooling I'd care for right now is just for adding new views - that is a pain right now in VS 2010 where I can't add a new view/partial view.


  22. Avatar for Paula Jeggigns
    Paula Jeggigns December 23rd, 2009

    From my experience it looks like every new product has a lot of bugs and security holes. Guess that I'll stick to 2008 and see the new one in few months.

  23. Avatar for Salman Farsi
    Salman Farsi December 25th, 2009

    Hi,
    I'm very surprised that I just Download VS2010 Ultimate Beta 2, it contains ASP.NET MVC 2.0 Support.
    But now it is clear me some issues.
    Regards

  24. Avatar for James
    James January 28th, 2010

    Is there any support for an install failure? I am trying to get the latest MVC 2.0 bits loaded in VS2008 and I'm not having much luck ('Microsoft ASP.NET MVC 2' RunCheck result: Fail in the log).
    I'd be happy to share config information and logs if anyone's interested.
    Cheers,
    -jc

  25. Avatar for Brooks Bayne
    Brooks Bayne February 2nd, 2010

    and this is precisely why we should always stay away from betas. geebus, not a small oversight here, guys.