Kigg Changeset 38916 unable to build under Visual Studio 2010

Apr 26, 2010 at 4:09 PM

I was trying to open Kigg-38916 project on my Visual Studio 2010 RTM.  I was not upgrade to ASP.NET 4.  Then I press Build (F6), I got the following error:

CS0433: The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\Windows\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' and 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll'.

I've just found that Visual Studio 2010 using .NET 4's aspnet_compiler.exe to build this website.   Is it a bug for Visual Studio 2010?  Is there any workaround for this problem?

By the way, this problem will only exists in BuildView enabled situation.

Thanks!

Jun 5, 2010 at 4:46 PM
Edited Jun 5, 2010 at 4:46 PM
  • open Kigg.Web.csproj in notepad
  • update the <target> element w/ this:

 <Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">    

<AspNetCompiler VirtualPath="temp" ToolPath="C:\Windows\Microsoft.NET\Framework\v2.0.50727" PhysicalPath="$(ProjectDir)\..\Web" />  

</Target>