Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC3 RTM Futures - Installing Microsoft.Web.Mvc

I'm trying to get futures running for Mvc3 RTM. There is no .dll included after installing mvc3 from webPI.

I've downloaded the source and have tried to build it myself, but when I drop it into my solution and add the namespace to the web.config under the Views folder I get the following error on every page:

S0012: The type 'System.Web.Mvc.Controller' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'.

I guess it's because because of strong naming or something along those lines.

How can I get up and running with futures?

Edit:

1) I might be wrong, but from memory, when you downloaded and installed previous versions of MVC, it would give you a Microsoft.Web.Mvc .dll under Program File/Microsoft ASP.NET/Asp .net MVC2. With WebPI install, there is only System.Web.Mvc.dll in that location.

2) It is definitely not in the GAC... it's not the place for this assembly (I also checked just to make sure)

3) The project that is not working is the target project. I created a new 'Asp .net Mvc 3 Application' ran it to make sure it worked (it did). Then I added a reference to the assembly I built from the Mvc 3 Source Code and altered the web.config under the 'Views' folder.

<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
  <namespaces>
    <add namespace="System.Web.Mvc" />
    <add namespace="System.Web.Mvc.Ajax" />
    <add namespace="System.Web.Mvc.Html" />
    <add namespace="System.Web.Routing" />
    <add namespace="Microsoft.Web.Mvc" />
  </namespaces>
</pages>

4) As soon as I remove the namespace element and the dll, the project works again.

like image 331
Jonathon Kresner Avatar asked Jan 16 '11 00:01

Jonathon Kresner


2 Answers

You could download the source code of MVCContrib and inside the bin/AspNetMvc folder you will find the Microsoft.Web.Mvc assembly which is compiled against ASP.NET MVC 3.0.

like image 101
Darin Dimitrov Avatar answered Nov 07 '22 09:11

Darin Dimitrov


It's been added to the MVC 3 RTM release now :

http://aspnet.codeplex.com/releases/view/58781#DownloadId=211128

The direct link is here :

http://aspnet.codeplex.com/releases/view/58781#DownloadId=211128

like image 28
Simon_Weaver Avatar answered Nov 07 '22 07:11

Simon_Weaver