Unresolved assembly reference: PresentationCore? (.NET 4.0)

May 7, 2010 at 10:24 PM

Hello,

Currenty i am deploying an .NET Project and i want to generate the help file using shfb.

But i get following a build error:

-------------------------------
[Sandcastle Help File Builder Utilities, version 1.8.0.3]
Creating output and working folders...
-------------------------------
Clearing working folder...
-------------------------------
Finding tools...
Found Sandcastle tools in 'C:\Program Files (x86)\Sandcastle\'
Searching for HTML Help 1 compiler...
Found HTML Help 1 compiler in 'C:\Program Files (x86)\HTML Help Workshop\'
-------------------------------
Validating and copying documentation source information
Source: [...]
    Found assembly [...]
Source: [...]

References to use:
    PresentationCore

Copying XML comments files
    [...]
-------------------------------
Generating shared content files (en-US, Englisch (USA))...
    Last step completed in 00:00:00.0060
-------------------------------
Generating API filter for MRefBuilder...
    Last step completed in 00:00:00.0030
-------------------------------
Generating reflection information...
[C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe]
GenerateRefInfo:
  MrefBuilder (v2.4.10520.1)
  Copyright ¸ Microsoft 2006
  Info: Loaded 1 assemblies for reflection and 0 dependency assemblies.
MREFBUILDER : error : Unresolved assembly reference: PresentationCore (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) required by [...]
    Last step completed in 00:00:01.7340
-------------------------------

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

 

My first try was to add a reference to the unresolved assembly (C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\PresentationCore.dll) but it doesn't fixed the build error.

In the project properties from shfb i declared the FrameworkVersion as 4.0.30319

What am I doing wrong?

Coordinator
May 8, 2010 at 3:22 AM
Edited May 8, 2010 at 3:22 AM

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

 

May 8, 2010 at 9:20 AM
Edited May 8, 2010 at 9:20 AM

Thank you very much for your reply. Now it wokrs, so for any other user who wants this error fixed, yiu have to:

1. Install the latest Sandcastle Styles patch (for me it was Sandcastle May 2008 (2.4.10520) Patch - Rev 3)

2. Fix your MrefBuilder.exe.config file: see here