Posted by: lluppes | March 1, 2012

MVC4 Beta Side-By-Side with MVC3

The MVC4 Beta was recently released and I started working with the bits on a project as a pilot.  There’s a lot of cool new useful stuff in there, including some great stuff for creating REST based APIs easily within an MVC project (more info: http://www.asp.net/mvc/mvc4).

The install is advertised as being able to be deployed side-by-side with MVC3, and for the most part it is.

However, when I went back to my MVC3 project after installing MVC4, I had a couple of compile errors, namely one major gotcha:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3247: Found conflicts between different versions of the same dependent assembly.

After a bit of digging, I found that my MVC3 project referenced the System.Web.Pages and System.Web.Helpers DLLs, but without specifying a version.  I was able to go into my project file and make a couple of quick edits that put everything back in it’s proper place and working again.

Project Definition File Before: (*.csproj)

    <Reference Include=”System.Web.WebPages”>
      <Private>True</Private>
    </Reference>
    <Reference Include=”System.Web.Helpers”>

Project Definition File After: (*.csproj)

    <Reference Include=”System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL”>
      <SpecificVersion>True</SpecificVersion>
    </Reference>
    <Reference Include=”System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL”>
      <Private>True</Private>
    </Reference>

Written by .

Advertisements

Responses

  1. […] thing I had to do was to update the project file to fix the references to System.Web.WebPages (see https://blog.luppes.com/2012/03/01/mvc4-beta-side-by-side-with-mvc3/).  Once that was fixed, when I fired up the app, I got the same error, and it was breaking on the […]

  2. I enjoy, lead to I discovered exactly what I was having a look for.
    You’ve ended my 4 day long hunt! God Bless you man. Have a great day. Bye


What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: