ASP.NET MVC For Visual Studio 2010 Beta 1

This post is now outdated

I apologize for not blogging this over the weekend as I had planned, but the weather this weekend was just fantastic so I spent a lot of time outside with my son.

the-parkIf you haven’t heard yet, Visual Studio 2010 Beta 1 is now available for MSDN subscribers to download. It will be more generally available on Wednesday, according to Soma.

You can find a great whitepaper which describes what is new for web developers in ASP 4 which is included.

One thing you’ll notice is that ASP.NET MVC is not included in Beta 1. The reason for this is that Beta 1 started locking down before MVC 1.0 shipped. ASP.NET MVC will be included as part of the package in VS10 Beta 2.

Right now, if you try and open an MVC project with VS 2010 Beta 1, you’ll get some error message about the project type not being supported. The easy fix for now is to remove the ASP.NET MVC ProjectTypeGuid entry as described by this post.

We’re working hard to have an out-of-band installer which will install the project templates and tooling for ASP.NET MVC which works with VS2010 Beta 1 sometime in June on CodePlex. Sorry for the inconvenience. I’ll blog about it once it is ready.

What others have said

Requesting Gravatar... Will May 18, 2009 2:33 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Well done for getting this fixed, but sheesh! What's wrong with the VS2010 project that this couldn't be in the beta? It's only beta 1 for goodness sake, and MVC has been at that quality for ages.

I know you're the good guys - how do you put up with this?
Requesting Gravatar... Mark Hoffman May 18, 2009 5:39 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Glad to see that MS is really putting their weight behind MVC....Not wanting to read too much into this, but it kinda seems that MS pats you guys on the head; lets you build your cute little MVC thingy but doesn't want you to interfere with shipping their "real" developer products and the next flavor of web forms.

I know you guys are passionate about ASP.NET MVC, but it's hard not see the notable absence of MVC from the beta as a sign that rest of Redmond continues on the Clueless Train and still doesn't see MVC as important.
Requesting Gravatar... Haacked May 18, 2009 7:01 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
@Will @Mark I updated my post with a better explanation. The reason it's not in Beta 1 is that the quality lockdown happened a while ago, before we shipped MVC 1.0. We'll be in the box for Beta 2.
Requesting Gravatar... JP May 18, 2009 8:08 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Good Lord man, never apologize for spending time with your son!
Requesting Gravatar... fschwiet May 18, 2009 11:51 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Sounds like main product needs to lock down sooner, as they need more room to land. I hope the MVC team can handle a sharper descent :)
Requesting Gravatar... Will May 19, 2009 12:57 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Thanks for the update - it will probably take more than that to convince me that VS2010 isn't a sort of geological disaster! Actually, my general belief is that VS has made itself far too dependent on far too much stuff, so I shouldn't really complain if the deps I want aren't in the box...
Requesting Gravatar... BB May 19, 2009 7:20 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Thank you for the post. Strange though; the PDF docs stated MVC and Azure would be in there, so I was looking forward to not manually creating things.

Question - if the guid is removed, I assume it will need to be added back in the get the MVC project features to function again (i.e. Add View etc.), is this correct? Is there any danger with adding/ removing, depending on what environment is being used?

Also - if using a current MVC project and compiling with VS 2010, is there any danger of changed version numbers that would cause breakage with deployed items? I.e. App compiled and deployed, now server must have .NET 4.0 beta installed.

Thanks!
Requesting Gravatar... Conjure May 19, 2009 7:22 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
I see that ASP.NET 4 has some new features which make it competitive with MVC from a routing standpoint. I use some Devexpress utilities and they have been somewhat slow on adapting to MVC. I'm curious if they are simply waiting for the next version to appear. In either case, I am using all flavors of ASP.NET now (webforms and MVC) to cover all the bases.
Requesting Gravatar... Guy May 19, 2009 7:57 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Wow, the conspiracy theories run amok with this one!
Requesting Gravatar... Mark J. Miller May 19, 2009 8:15 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
I love what you guys have done with MVC. I've been using it since preview 1. I've was reading the "what's new" for ASP.NET 4.0 and wondering what the roadmap is for MVC 2.0. Will VS 2010 just ship MVC 1.0 with MVC 2.0 coming out-of-band? And is there any news on what kind of goodies we can see in 2.0?
Requesting Gravatar... Peter.O May 19, 2009 8:23 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
The MVC team has been nothing but open with the community. So, I wonder why I shouldn't take their word for it. Features miss deadlines all the time. And let's face it! VS is a very large product with respect to feature set, team sizes, etc. Size requires structure, folks.

MVC enjoys one of the hottest profiles at MSFT right now. Even a VP blogs this thing regularly, for crying out loud. Moreover, there's a workaround hack for Beta1, an OOB installer is in the works and we are promised that MVC will make Beta2. So, I don't know where the apprehension is coming from. We can't wait to 'stick it to The man', can we?

ASP.NET MVC is a cool, cool one! We haven't had any sweetness of that kind (the team, the tool, community focus, etc) from MSFT in recorded history. But, hey, guys, let's not start a holy war yet. Better still, let's not even start a religion out of this in the first place.
Requesting Gravatar... Haacked May 19, 2009 8:27 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
@BB If you remove the ProjectTypeGuid, you will lose the tooling support. When we add the tooling support back in, you can add the GUID back in and the tooling support will work.

If you work on a current MVC project (aka MVC 1.0) using VS10, make sure you're targetting the 3.5 framework and you should be fine.
Requesting Gravatar... Ragini May 19, 2009 8:59 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
nice article though!

but what about those like me who use the Visual Studio Team System 2008, as a collaborative project. I recently downloaded it from the official microsoft site- http://bit.ly/OxdIK

kindly review this as well.
Requesting Gravatar... BB May 20, 2009 2:20 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
@Haacked

Thanks, one follow-up regarding using VS 2010 and the removal of the GUID. If the project type is removed, will code behinds not get added to new pages? Will the intellisense still work then for manually created aspx pages with no codebehind, and manually adding the model type? i.e. Inherits="System.Web.Mvc.ViewPage<SomeStrongType>"

thanks
Requesting Gravatar... Scott Galloway May 20, 2009 2:36 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Love the conspiracy theories! Truth is that MVC would have had to lock down a lot earlier to get into Beta 1; which is a massively complex undertaking with integration of content from around 50 different teams, take a fair bit of time!
To have made the Beta 1, MVC would have been way less mature than it is right now.
Requesting Gravatar... Colin Desmond May 21, 2009 7:03 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Phil,

Many thanks for MVC, the book (excellent) and this Blog!

I have upgraded by VS2008 MVC to a VS2010(b1) as suggested here, but when I try to run it I get the following error:

Compiler Error Message: CS0246: The type or namespace name 'Helpers' could not be found (are you missing a using directive or an assembly reference?)

Line 1: <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
Line 2: <%@ Import Namespace="Helpers" %>
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "www.w3.org/.../xhtml1-strict.dtd">
Line 4: <html xmlns="http://www.w3.org/1999/xhtml">

I am definitely targeting 3.5. This happens when I use either IIS or the Dev Web Server. Any ideas what might be going wrong?
Requesting Gravatar... Rickj May 21, 2009 10:23 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
VS 2010 is the greatest little beta toy for a beta junkie like me the only thing I have a problem with is I got such a good install right of the hop for a beta I don't want to monkey around with it so I think I'll wait for the installer one Question I have on the next release of MVC is there going to be support for pulling pictures out of a database ie: a logged in member has a profile with a picture tied to a UserId I've been looking for an artical, walkthrough or example for about a month now with no luck and if you think about it if your building a dating site, job site , forum to list a few it is almost standard to have a picture
Just somthing to think about keep up the good work guys
Thanks
Requesting Gravatar... Mikael Henriksson May 26, 2009 4:37 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Thanks for sharing, I hate hacking visual studio so I'll wait for the installer :)
Requesting Gravatar... DonSleza4e May 28, 2009 4:05 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Migrated to VS2010b1

IDE every time crashes when I trying to RedirectToAction("Index", "Message")
and this action
Inherits="System.Web.Mvc.ViewPage<LRMUP.Models.MessageClass>"

When I remove <LRMUP.Models.MessageClass> - everything work fine
Targeting: .Framework 4.0 (well, I migrated only because of new C# 4.0 cool features)
Requesting Gravatar... DonSleza4e May 28, 2009 4:16 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
As temp solution I using next:
view is Inherits="System.Web.Mvc.ViewPage"

and accessing model values as
<%=((MessageClass)Model).title %>

this works fine for me. However need to be changes to 'good style' when crash will be resolved
Requesting Gravatar... sebastian May 29, 2009 10:07 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Also included in VS2010 (and included in this beta release) are significant extensions to Dotfuscator CE that support
* the injection of feature and session monitoring (streaming usage data to a developer-specified endpoint),
* the injection of application expiry dates, and
* the injection of tamper defense and notification.
* Opt-in/Opt-out logic can also be injected.

Microsoft first announced this functionality at PDC2008
www.microsoft.com/.../10-27PreEmptivePR.mspx

If you want a detailed walk through, check out Bill Leach’s blog entry at blogs.preemptive.com/.../...tudio-2010-Beta-1.aspx

For a MSFT employee blog entry on the same topic, check out blogs.msdn.com/.../...d-partner-opportunities.aspx
Requesting Gravatar... JO May 30, 2009 1:57 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
What is the best way to extend the "ASP .NET MVC Template" template. I would like to create additional directories. I could do it independent of the "ASP .NET MVC Template" template but I would like to extend your template.
Requesting Gravatar... Mike Jun 07, 2009 7:46 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
VS2010? I havent even installed VS 2008 yet. At some point this has to slow down. The pace is absurd and illogical.
Requesting Gravatar... Francesco Jun 13, 2009 9:21 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
I am experiencing the same issue than DonSleza4e with strongly typed view pages.
I tried to add the pageParserFilterType attribute on pages node in web.config, but the problem is still there.
Is this a known bug?
Requesting Gravatar... Francesco Jun 13, 2009 9:48 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Well, I just disabled the historycal debugger and everything seems working now
Requesting Gravatar... 2010 Registry Cleaners Jan 10, 2010 4:24 AM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Nice post - it's good to keep reminders like this about your software development days.
Requesting Gravatar... college essay Mar 14, 2010 10:42 PM
# re: ASP.NET MVC For Visual Studio 2010 Beta 1
Can't wait for this new release. Thanks!

What do you have to say?

(will show your gravatar)
Please add 1 and 2 and type the answer here: