views:

180

answers:

3
Error   7   The type 'System.Web.Routing.RouteValueDictionary' 
exists in both 
'c:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll'
and 
'c:\WINNT\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll'    
c:\Projects\VS\solutionfolder\projectfolder\Views\group\List.aspx   44  ProjectName

The project utilizes T4MVC.tt if that is relevant. Also Visual studio 2010 ultimate. I did not upgrade the target .net framework to 4.0 because my host will not support this for ~24 hours.

I have a .Tests project in the same solution that says it is targeting .net 4.0 but it still won't build even with that unloaded, same message.

A: 

I'm experiencing the same problem. Discussion here: http://forums.asp.net/p/1516204/3628684.aspx, but no answer.

Colin
+1  A: 

I changed my configuration to one that did not include MVCBuildViews set to true and it published.

Maslow
Had the same issue on some view, changing this setting cleared it. Guess that's why this setting is not part of the project properties GUI ;-)
Tungano
A: 

There's a solution here:

<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
    <AspNetCompiler ToolPath="C:\Windows\Microsoft.NET\Framework\v2.0.50727" VirtualPath="temp"  PhysicalPath="$(ProjectDir)\..\Web" />
  </Target>

CW since it's not mine; I just copied and pasted.

Craig Stuntz