Wednesday, February 22, 2012

VS2010: build errors when building .net 3.5 application on visual studio 2010

I have downloaded Kigg from codeplex, when I tried to build the web project, I was facing the below errors

Error 1 The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll' and 'c:\Windows\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' d:\svn\kigg\kigg\Source\Web\Views\Membership\Detail.aspx 21 Kigg.Web Error 2 The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll' and 'c:\Windows\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' d:\svn\kigg\kigg\Source\Web\Views\Membership\Detail.aspx 27 Kigg.Web Error 3 The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll' and 'c:\Windows\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' d:\svn\kigg\kigg\Source\Web\Views\Membership\Detail.aspx 34 Kigg.Web

Screenshot-2012-02-21_17.53.20

Searching for a solution, I didn’t find much on this error, only this post here

http://stackoverflow.com/questions/7233308/how-to-install-asp-net-kigg-starter-kit

And it was referring to  https://connect.microsoft.com/VisualStudio/feedback/details/557798/visual-studio-2010-compile-asp-net-3-5-website-using-net4s-aspnet-compiler-exe

Following the steps

I opened the file Kigg.Web.csproj

Searched for AspNetCompiler, found it here

<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"> <AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)\..\Web" /> </Target>

added the toolpath parameter to be like

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

Reloading the project after that, I was able to build successfully

No comments:

Post a Comment