visual-studio-2010.net-4.0sandcastle

error during build using sandcastle help builder with visual studio 2010 .NET 4.0 project


I was using sandcastle to generate help for my project in visual studio 2008. When i change my project to visual studio 2010 and change the project .NET version to .NET 4.0 i got this problem with Sandcastel. I can't understand why sandcastel is using C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe and not C:\Windows\Microsoft.NET\Framework64\v4.0\MSBuild.exe thinking that i specified as framework version the v4.0.30319

Can anyone tell me how to resolve this issue?? Where to change the path of the msbuild.exe or some other solution ???

Generating reflection information...
[C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe]
GenerateRefInfo:
  MrefBuilder (v2.4.10520.1)
  Copyright c Microsoft 2006
  Info: Loaded 1 assemblies for reflection and 0 dependency assemblies.
MREFBUILDER : error : Unresolved assembly reference: System.Windows.Forms (System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) required by WLAEDInt

Last step completed in 00:00:01.2731

-------------------------------

SHFB: Error BE0043: Unexpected error detected in last build step.  See output above for details.

Solution

  • I had the same problem today, and this post helped me resolve it: http://shfb.codeplex.com/Thread/View.aspx?ThreadId=214594

    Solution summary:

    Step 1: Ensure you've got the latest Sandcastle patches, especially for VS2010, available at: sandcastlestyles.codeplex.com. As of today, it is 'Sandcastle May 2008 Patch Rev 3 '.

    Step 2: Add another supportedRuntime element to the 'MRefBuilder.exe.config' file that utilizes the RTM version of .NET 4.0:

    <supportedRuntime version="v4.0.30319"/> <!-- 4.0 RTM -->
    

    I still had the error after step 1, then step 2 finally fixed it.