Reputation: 4224
I have recently started to use NuGet and I was wondering if there is an asp.net mvc 3 package that I can install so that I do not have to reference the aspnet mvc3 assemblies via a lib folder like the traditional way with all references set to CopyLocal = true. At the moment I have the following assemblies in my lib folder:
Microsoft.Web.Infrastructure.dll System.Web.Helpers.dll System.Web.Mvc.dll System.Web.Razor.dll System.Web.WebPages.Administration.dll System.Web.WebPages.Deployment.dll System.Web.WebPages.dll System.Web.WebPages.Razor.dll
Any idea?
Upvotes: 17
Views: 17257
Reputation: 6158
If you're coming across this question now, the other solutions will likely no longer work for VS2012, VS2013, and beyond. Instead, I found adding the correct NuGet package worked seamlessly:
In Tools > NuGet Package Manager > Package Manager Console
:
PM> Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1
This package is owned by Microsoft, and trustworthy.
Upvotes: 8
Reputation: 1998
Just a note for upgrading to MVC4
If you are still using bin deployables (“Add Deployable Assembly”) for your current ASP.NET MVC setup .. you should remove it and replace it with the AspNetMvc nuget package.
Upvotes: 3
Reputation: 59061
If you're using Visual Studio 2010 SP1, you can right click on the project and select "Add Deployable Assemblies". Select the ASP.NET MVC 3 option. That'll add the MVC assemblies to a special directory which will ensure they are in the bin directory when building/publishing your web application.
Upvotes: 18
Reputation: 11661
Looks like the "aspnetmvc" NuGet package is what you're looking for.
http://nuget.org/List/Packages/aspnetmvc
N.B. This isn't an official package from Microsoft, but one created by a member of the community.
Upvotes: 8