Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC 3 references automatically updates to MVC 4

I just installed the Visual Studio 11 and MVC 4 beta on my local machine. However, whenever I open up an MVC 3 project (that I want to keep as MVC 3), all the references have been updated to the version 4 DLLs. Surely it shouldn't be doing that?

The MVC 3 project opens in Visual Studio 2010.

UPDATE:

I looked in the .csproj file of my MVC 3 project and I can see all of the references in place, but they don't specify paths. If no path is specified, does it just pick up the latest version of the DLL?

like image 355
Dan Ellis Avatar asked Jan 21 '26 23:01

Dan Ellis


1 Answers

You can specify which version of an assembly you require in the Include attribute as shown here:

<Reference Include="System.Web.Mvc, Version=3.0.0.0" />

Without specifying a path or version, Visual Studio will match on any assembly with the same name.

You can find out more about Reference resolution in Visual Studio at the following links:

Visual Studio Integration (MSBuild)

ResolveAssemblyReference Task

like image 84
Andy Avatar answered Jan 23 '26 14:01

Andy