views:

423

answers:

2

If I develop a site using the version of ASP.NET MVC 2 that ships with Visual Studio 2010 Beta 2, what do I install on my Web server to get to run correctly?

From what I've gathered, there are two paths for ASP.NET MVC 2. One (the Preview 2, I believe) is included in Visual Studio 2010 Beta 2. The other one, the ASP.NET MVC 2 Beta, is newer and not compatible with Visual Studio 2010 Beta 2.

The site sort of works on my Web server if I install the ASP.NET MVC 2 Preview 2, or the newer ASP.NET MVC 2 Beta, however both give errors that I don't see when I run it using the built-in ASP.NET Development Web server (cassini). Specifically, the error involves a line that calls the FormCollection.ToValueProvider() method. The error states that method doesn't exist, and I believe that is because that method has changed in recent versions.

+1  A: 

Based on a recent interview with Phil Haack by Scott Hanselman, ASP.NET MVC2 only relies on the Microsoft .NET Framework 3.5 SP1.

In his blog post, Phil states that the Beta is indeed not compatible with VS2010 Beta 2 (and is in fact not supported). Based on the release notes, it appears that a lot of the value provider methods have changed in Beta 2, which may be the cause of your issues. There is updated tooling for Visual Studio 2008, though. I would recommend rebuilding your solution in VS2008 with the ASP.NET MVC2 Beta and addressing any errors you find there.

Good luck!

mkedobbs
+1  A: 

The answer turned out to be installing ASP.NET MVC 2 Preview 2. That is the same version as ships with VS2010 Beta 2.

I had first installed ASP.NET MVC 2 Beta, and when it didn't work, I uninstalled it and installed Preview 2. Apparently I needed to reboot for the change to take effect.

Ken Pespisa
So simply including the MVC 2 Preview 2 in your application's bin folder is not enough correct? I would need to uninstall MVC 2 Beta and install Preview 2?
Baddie
I would think yes, assuming in your situation that you'd have the preview 2 version of System.Web.MVC.dll in your ~\bin folder, and the beta version in your GAC which was put there from the install. This post (http://stackoverflow.com/questions/981142/dll-in-both-the-bin-and-the-gac-which-one-gets-used) talks a bit about the order .NET searches for DLLs. In that scenario, .NET would find the DLL in the GAC (the Beta version) first and use it because it has the same version number, 2.0.0.0.
Ken Pespisa