Error BE0043 for Silverlight class library documentation help file generation

Apr 12, 2010 at 4:58 AM

 

Hi, 
I have been trying to generate the help from a silverlight class library but I keep getting the same error. 
I have added the .csproj file as document source along with the .dll and .xml file. 
The assembly references come from a different folder "~/programfiles/Microsoft SDKs/Silverlight/v2.0/Reference assemblies". 
I tried adding the "Assembly binding redirection" but I dont quite understand how to use it. 
Can anyone please help? 
Here is the build log for the project. 
------------------------------- 
[Sandcastle Help File Builder Utilities, version 1.8.0.3] Creating output and working folders... 
-------------------------------
 Finding tools... Found Sandcastle tools in 'C:\Program Files\Sandcastle\' Searching for HTML Help 1 compiler... Found HTML Help 1 compiler in 'C:\Program Files\HTML Help Workshop\' 
------------------------------- 
Validating and copying documentation source information Source: C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\VMS.ClientAccessFramework.csproj Found project 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\VMS.ClientAccessFramework.csproj' Source: C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.dll Found assembly 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.dll' Source: C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.xml Parsing project files Found assembly 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.dll' References to use: mscorlib system System.Core System.Net System.Windows System.Windows.Browser System.Xml Copying XML comments files C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.XML -> C:\WorkSpace\SelfStudy\Help\Working\VMS.ClientAccessFramework.XML SHFB: Warning BE0063: 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.XML' matches a previously copied comments filename. The duplicate will be copied to a unique name to preserve the comments it contains.
C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.XML -> C:\WorkSpace\SelfStudy\Help\Working\{82e25240-d62b-4ea5-a524-623f7d21dc88} 
------------------------------- 
Generating shared content files (en-US, English (United States))... Last step completed in 00:00:00.0938
 ------------------------------- 
Generating API filter for MRefBuilder... Last step completed in 00:00:00.0469
 ------------------------------- 
Generating reflection information... [c:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe] GenerateRefInfo: MrefBuilder (v2.4.10520.1) Copyright c Microsoft 2006 Info: 
Loaded 2 assemblies for reflection and 5 dependency assemblies.
 MREFBUILDER : error : Unresolved assembly reference: System (System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) required by VMS.ClientAccessFramework 
Last step completed in 00:00:06.1563 
-------------------------------
 SHFB: Error BE0043: Unexpected error detected in last build step. See output above for details.
Here are the properties of one of the references I have in the .Net project :
Description: System.dll
Path : c:\Program Files\Microsoft SDKs\Silverlight\v2.0\Reference Assemblies\system.dll
Runtime version : v2.0.50727
Specific Version: False
Strong Name : True
Version: 2.0.5.0
Same is the case with rest of the assemblies like System.Core, System.Net, System.Xml, System.Windows, and System.Windows.Browser.
I had put this query in the Sandcastle Help File Builder forum but "EWoodruff" asked me to ask in this forum.... I really need to make this work. 
Please help !
 Thanks, 
Aseem Chiplonkar

Hi, 

 

I have been trying to generate the help from a silverlight class library but I keep getting the same error. 

 

I have added the .csproj file as document source along with the .dll and .xml file. 

 

The assembly references come from a different folder "~/programfiles/Microsoft SDKs/Silverlight/v2.0/Reference assemblies". 

 

I tried adding the "Assembly binding redirection" but I dont quite understand how to use it. 

 

Can anyone please help? 

 

 

Here is the build log for the project. 

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

[Sandcastle Help File Builder Utilities, version 1.8.0.3] Creating output and working folders... 

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

 Finding tools... Found Sandcastle tools in 'C:\Program Files\Sandcastle\' Searching for HTML Help 1 compiler... Found HTML Help 1 compiler in 'C:\Program Files\HTML Help Workshop\' 

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

Validating and copying documentation source information Source: C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\VMS.ClientAccessFramework.csproj Found project 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\VMS.ClientAccessFramework.csproj' Source: C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.dll Found assembly 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.dll' Source: C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.xml Parsing project files Found assembly 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.dll' References to use: mscorlib system System.Core System.Net System.Windows System.Windows.Browser System.Xml Copying XML comments files C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.XML -> C:\WorkSpace\SelfStudy\Help\Working\VMS.ClientAccessFramework.XML SHFB: Warning BE0063: 'C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.XML' matches a previously copied comments filename. The duplicate will be copied to a unique name to preserve the comments it contains.

 

C:\WorkSpace\SelfStudy\VMS.ClientAccessFramework\Bin\Debug\VMS.ClientAccessFramework.XML -> C:\WorkSpace\SelfStudy\Help\Working\{82e25240-d62b-4ea5-a524-623f7d21dc88} 

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

Generating shared content files (en-US, English (United States))... Last step completed in 00:00:00.0938

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

Generating API filter for MRefBuilder... Last step completed in 00:00:00.0469

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

Generating reflection information... [c:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe] GenerateRefInfo: MrefBuilder (v2.4.10520.1) Copyright c Microsoft 2006 Info: 

Loaded 2 assemblies for reflection and 5 dependency assemblies.

 MREFBUILDER : error : Unresolved assembly reference: System (System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) required by VMS.ClientAccessFramework 

Last step completed in 00:00:06.1563 

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

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

 

 

Here are the properties of one of the references I have in the .Net project :

 

Description: System.dll

 

Path : c:\Program Files\Microsoft SDKs\Silverlight\v2.0\Reference Assemblies\system.dll

 

Runtime version : v2.0.50727

 

Specific Version: False

 

Strong Name : True

 

Version: 2.0.5.0

 

Same is the case with rest of the assemblies like System.Core, System.Net, System.Xml, System.Windows, and System.Windows.Browser.

 

I had put this query in the Sandcastle Help File Builder forum but "EWoodruff" asked me to ask in this forum.... I really need to make this work. 

 

Please help !

 

 Thanks, 

Aseem Chiplonkar

 

P.S. here is the initial discussion http://shfb.codeplex.com/Thread/View.aspx?ThreadId=208521&ANCHOR&ProjectName=SHFB

 

 

 

Jul 13, 2010 at 3:57 PM

I am seeing this exact same error with a silverlight project... any ideas yet?

Harold

 

Aug 10, 2010 at 6:13 PM
1. In the Project Explorer for the Sandcastle HelpFile Builder, right-click on "References" 2. Select "Add File/Project Reference" 3. Navigate to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight 4. Select your framework version 5. Add the requested assemblies from here into your project 6. Next time you compile the SHFB project, it should recognize those assemblies
Sep 7, 2011 at 9:37 PM

I have the same problem with Silverlight 5 Beta. I have tried all of these suggestions.

 Info: Loaded 1 assemblies for reflection and 30 dependency assemblies.MREFBUILDER : error : Unresolved assembly reference: System.Windows (System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) required by System.ServiceModel.DomainServices.Client

Editor
Sep 8, 2011 at 2:16 AM

Silverlight projects are supported natively by SHFB 1.9.3.0 and later.  Make sure you select the appropriate Silverlight version in the SHFB project using the FrameworkVersion property.  There's no need to add references as the build engine will pick up the correct references from the project if you are using it as a documentation source.  It will add all Silverlight assembly references it can find if using the assembly alone as a documentation source.  I haven't tried it with the Silverlight 5.0 Beta yet but if SHFB can find the framework, it should appear as an option in the property dropdown.  If not, you can try one of the other versions that is present since it doesn't look like the assembly version number has changed yet.

Eric

 

Sep 21, 2011 at 12:50 AM
Edited Sep 21, 2011 at 12:58 AM

Thanks for the quick response. Sorry for not replying sooner, this got put on the back burner.

I chose Silverlight 5 in the project settings but the error did not disappear.

I think it might have something to do with the fact we are using RIA services.

Sep 21, 2011 at 1:04 AM

That last post is when I build it in VS 2010. When I build it in the GUI it says the Silverlight 4 SDK is not installed.

Sep 21, 2011 at 6:47 PM
EWoodruff wrote:

Silverlight projects are supported natively by SHFB 1.9.3.0 and later.  Make sure you select the appropriate Silverlight version in the SHFB project using the FrameworkVersion property.  There's no need to add references as the build engine will pick up the correct references from the project if you are using it as a documentation source.  It will add all Silverlight assembly references it can find if using the assembly alone as a documentation source.  I haven't tried it with the Silverlight 5.0 Beta yet but if SHFB can find the framework, it should appear as an option in the property dropdown.  If not, you can try one of the other versions that is present since it doesn't look like the assembly version number has changed yet.

Eric

 

Also did you have success with this?

Sep 22, 2011 at 8:00 PM

I am having the same problem as jperl. Any idea why Sandcastle is having problems with SL 5 Beta?

Sep 24, 2011 at 1:49 AM

>> Any idea why Sandcastle is having problems with SL 5 Beta?

The Sandcastle framework support is general so that it can be applied to any framework. There are few steps involved
in the support of other framework like Silverlight (since it is not an extension of the main .NET Framework).

Since you are using SHFB, you may have to wait till those supports are available and tested or you grab the source and
add them.

Best regards,
Paul. 

Editor
Sep 25, 2011 at 12:01 AM

It's a minor change to get it working.  For all other frameworks, SHFB just runs the 32 or 64-bit version of MSBuild.exe based on how it's running except for the GenerateRefInfo step.  Silverlight only supplies 32-bit build targets so it always needs the 32-bit version of MSBuild.exe to execute that step.  I had read that Silverlight 5.0 would have 64-bit support so I took a wild guess that there would be 64-bit build targets and it would run like all the other frameworks but that's not the case.  As such the condition that runs the 32-bit MSBuild.exe for the GenerateRefInfo step only for Silverlight 4.0 and earlier needs to be removed so that it runs it unconditionally for any version of Silverlight.  I'll check the change in later today so if you want to download and rebuild the code you can do so.  I'm not going to issue a new release of SHFB yet.

Eric

 

Sep 25, 2011 at 8:12 PM

Thank you EWoodruff for looking into this.

I ran and built checkin 92914 but I am recieving this error:

Unresolved assembly reference: System.Windows (System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) required by System.ServiceModel.DomainServices.Client

I have tried manually adding the reference (\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0\System.Windows.dll).

Editor
Sep 25, 2011 at 11:25 PM

Your problem is that the unresolved reference assembly is not the one for Silverlight 5.0.  All the ones I have (Silverlight 5.0 RC) have a version number of 5.0.5.0.  You'll need a Silverlight 5.0 version of System.ServiceModel.DomainServices.Client that depends on the 5.0 version of System.Windows.  If there isn't one, you can try using the Assembly Binding Redirection plug-in to redirect the older System.Windows reference version to the newer one.

Eric

 

Sep 25, 2011 at 11:58 PM

System.ServiceModel.DomainServices.Client.dll is WIA Services v1.0 assembly.
These have 2.0.5.0 version and target Silverlight 4.0.

The System.Windows.dll for Silverlight 4.0 has 2.0.5.0, and for Silverlight 5.0 has 5.0.5.0.

Best regards,
Paul. 

Sep 26, 2011 at 7:16 PM

The redirect worked!! Thanks.

Sep 28, 2011 at 1:54 AM

Thank you all for all the help, and as jperl said, the redirect worked wonderfully. 

 

One last question remains though, I now have a Silverlight documentation project and .NET documentation project along with the generated help files from each respectively. Is there any way to combine them? Its not a huge deal to have the separate files, but for convenience sake I would love to have only one.

 

Thanks again for all the help on the previous problem, never would have figured it out with out you all.

Editor
Sep 28, 2011 at 7:28 PM

You can use the Version Builder plug-in to merge the API topics for two assemblies into one help file.  If you've got any conceptual topics, you'll need to add them to the main project.  Be aware that there is a bug in the XSL transformations related to the version builder output.  A fix is available here: http://sandcastlestyles.codeplex.com/discussions/226453

Eric