开发者

Visual studio 2010 MVC 2 (2008 project imported) - publish fails - System.Web.Routing.RouteValueDictionary exists in both

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 t开发者_JAVA百科hat 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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜