views:

223

answers:

2

Is it possible to make a site with ASP.NET MVC Framework using .NET 2.0? I am limited to using .NET 2.0 (we use VS 2008, but we have to use the 2.0 Framework) and I really want to try out the MVC Framework.

+4  A: 

Scott Hanselman described a way to make it work, with some caveats, in his blog:

Deploying ASP.NET MVC on ASP.NET 2.0

Turnkey
+1  A: 

It can be done using Visual Studio 2008, but it can cause headaches...

  • Create an ASP.NET MVC Web Application
  • Set Project Target Framework to 2.0 in Project Properties
  • Add a references to System.Web.MVC (click through warning messages)
  • Add any additional references you may need (System.Web.Routing, System.Web.Abstractions) again clicking through any warning messages
  • Start coding!
  • Not everything you try will work, if you see errors like this on deployment it means that whatever you are doing isn't supported by the 2.0 framework...
    • "The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)"
  • Configure your IIS to support MVC Routes and extensions
  • Copy "C:\windows\assembly\GAC_MSIL\System.Core" from the .NET 3.5 development framework to the /bin folder of the IIS Server running .NET 2.0 SP1.

Much of this can be found in a lot more detail on Scott Hanselman's blog

pdavis