Visual Studio 2010 MVC 2 (project project imported) - publish crash - 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 uses T4MVC.tt, if that matters. Also, Visual Studio 2010 is final. I did not upgrade the target .net environment to 4.0, because my host will not support this for ~ 24 hours.

I have a .Tests project in the same solution, which says that it targets .net 4.0, but it still won’t be built even with this unloaded, the same message.

+3
source share
2 answers

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

+2
source

:

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

CW, ; .

+1

Source: https://habr.com/ru/post/1740973/


All Articles