Reputation: 4830
I recently did a fresh install of my PC. After installing all tools like VS2010 and VS 2012 i started getting the following error when building my MVC Solution:
The type 'System.Web.Mvc.TagBuilder' exists in both
'c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\System.Web.WebPages.dll'
and
'c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET WebPages\v2.0\Assemblies\System.Web.WebPages.dll'
I am usaing Windows 8, the Web Application targets .net 4.
How can i remove this conflict?
Upvotes: 1
Views: 2525
Reputation: 4019
In the <runtime>
section of your web.config add:
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
Upvotes: 1