error building in .NET 4.0 - problem with System.Windows.Forms

Topics: Developer Forum, Project Management Forum, User Forum
Jun 1, 2010 at 3:52 PM

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.

 

Jun 1, 2010 at 7:14 PM
Hello,

I saw your post too late and opened my own thread. I have a similar problem, only the required assembly reference is different (and allways the same Microsoft.VisualBasic, even if my executable needs no reference for it). maybe you can solve our prolem by adding the reference (as suggested in FAQ)

Regards, Rainer

Coordinator
Jun 1, 2010 at 7:22 PM

The May 2008 release of Sandcastle doesn't support .NET 4.0 without the latest Sandcastle Styles patch.  The patch is current as of the VS 2010 RC release so you will need to update the supplied MRefBuilder.exe.config to include the .NET 4.0 RTM version number.

Eric

 

Jun 1, 2010 at 7:42 PM
Edited Jun 1, 2010 at 7:44 PM
I am in Windows 7 64-bit and I just updated Sandcastle to Sandcastle May 2008 (2.4.10520) Patch - Rev 3. I am using .NET 4 and Visual Studio 2010, and my project still won't build. I get "SHFB: Error BE0033: No APIs found to document. See error topic in help file for details." The FrameworkVersion I have set in Sandcastle Help File Builder is 4.0.30319, the latest version listed in the menu. I'm using SHFB version 1.8.0.3.
Coordinator
Jun 1, 2010 at 11:54 PM

As noted above, the Rev 3 patch is only current through the last release candidate.  You need to 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 -->

Eric

 

Jun 2, 2010 at 9:37 AM

I applied the Rev3 patch and added the <supportedRuntime version="v4.0.30319"/> <!-- 4.0 RTM --> line in the MRefBuilder.exe.config file but the situation does not change

is this one:

Found Sandcastle tools in 'C:\Program Files (x86)\Sandcastle\'SHFB: Warning BE0004: MRefBuilder has a version of '2.5.10626.0' but version '2.4.10520.1' was expected.  You may need to update your copy of the help file builder.

Generating reflection information...[C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe]GenerateRefInfo:  MrefBuilder (v2.5.10626.0)  Copyright c Microsoft 2006MREFBUILDER : error : The type 'Microsoft.Ddue.Tools.Reflection.AssemblyResolver' was not found in the component assembly 'C:\Program Files (x86)\Sandcastle\ProductionTools\MRefBuilder.exe'.    Last step completed in 00:00:00.3550-------------------------------
SHFB: Error BE0043: Unexpected error detected in last build step.  See output above for details.

 

it pickup again the v3.5 of the msbuild and not the v4.0

Coordinator
Jun 2, 2010 at 3:17 PM

You appear to be using the executables from the July 2009 source code release which is not supported (it was never an official release).  If so, remove that version and install the May 2008 release available from the Downloads page at the Sandcastle project site.  Then apply the Sandcastle Styles patch to it with the MRefBuilder.exe.config change and it will work.

Eric

 

Jun 2, 2010 at 3:57 PM

if i do that i am back to the ERROR at the beginning of the thread. winforms

MREFBUILDER : error : Unresolved assembly reference: System.Windows.Forms (System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) required by WLAEDInt

 

Coordinator
Jun 2, 2010 at 7:24 PM

Sorry, but I don't know what else to tell you.  So far, the above has worked for everyone else.  It appears that you may have to wait for the next release of Sandcastle which is due out soon.

Eric

 

Jun 2, 2010 at 7:28 PM

Sounds like you just need to reapply the <supportedRuntime version="v4.0.30319"/> <!-- 4.0 RTM --> after you uninstalled and re-installed? I am using this on a 4.0 solution and it works fine.

Jun 7, 2010 at 2:43 PM

The passes till here aren't difficult so i don't think i have done anything wrong.

 

The problem is with winforms

MREFBUILDER : error : Unresolved assembly reference: System.Windows.Forms (System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) required by WLAEDInt

I started a new visual studio project putted in some classes some docs and Sandcastle works fine until...
until i add a windows form than i got the error.
I don't know why this happen and i hope i am not the only one.
I have installed visual studio 2008 and 2010 together, if this help.

 

Jun 9, 2010 at 5:41 PM

Try to add the line  <supportedRuntime version="v4.0.30319"/> <!-- 4.0 RTM --> at the top of the list in the MrefBuilder.exe.config file.

That wasn't mentioned before and I placed it at the end, having the same problems as ZeroAblsolute.

Taking a closer look at the entries in that config file shows: most current version is placed first. So I move the

added line to the top and surprise, surprise, it works.

Axel

Jun 24, 2010 at 3:09 PM
Edited Jun 24, 2010 at 3:14 PM
I have the May 2008 release installed and i've applied the Sandcastle Styles patch.
In addition i've added <supportedRuntime version="v4.0.30319"/> <!-- 4.0 RTM --> to the MrefBuilder.exe.config file.
I am still seeing

Generating reflection information...
C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe]
GenerateRefInfo:
MrefBuilder (v2.4.10520.1)
Copyright c Microsoft 2006
Info: Loaded 7 assemblies for reflection and 0 dependency assemblies.
Info: Wrote information on 19 namespaces, 79 types, and 402 members
XslTransform (v2.4.10520.1)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\MergeDuplicates.xsl'.
Last step completed in 00:00:03.0167
But the SHFB project builds fine and i am able to generate the CHM file. But i am still confused as to why it is not using MsBuild 4.0.
- Karthik
Coordinator
Jun 24, 2010 at 3:13 PM

SHFB is built with .NET 3.5, references the MSBuild 3.5 assemblies in its build tasks, and thus uses MSBuild 3.5 when it executes its projects.  I plan on releasing a version built with .NET 4.0 that supports MSBuild 4.0 and VS 2010 projects in the upcoming release.

Eric

 

Aug 18, 2010 at 8:17 AM
thanks a lot now it works fine i didn't noticed that difference. 

On Wed, Jun 9, 2010 at 7:41 PM, cubic <notifications@codeplex.com> wrote:

From: cubic

Try to add the line  <supportedRuntime version="v4.0.30319"/> <!-- 4.0 RTM --> at the top of the list in the MrefBuilder.exe.config file.

That wasn't mentioned before and I placed it at the end, having the same problems as ZeroAblsolute.

Taking a closer look at the entries in that config file shows: most current version is placed first. So I move the

added line to the top and surprise, surprise, it works.

Axel

Read the full discussion online.

To add a post to this discussion, reply to this email (SHFB@discussions.codeplex.com)

To start a new discussion for this project, email SHFB@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
dott. Kelvin Ekonomi
cel. +393206481740
cel. +355686031901
Sep 4, 2010 at 6:26 AM

Read this blog post for installation instruction for .NET 4.

http://blog.jayway.com/2010/08/28/get-your-sandcastle-up-and-running-within-15-minutes/

Best Regards, Henrik

Jul 12, 2013 at 6:34 AM
my problem was miss "cref" property for <exception>; Modified as <exception cref="***">,the problem disappeared.