Unresolved reference to assembly, even though given as dependency

Topics: User Forum
Nov 28, 2007 at 5:34 PM
Hi there,

I am creating documentation for an assembly referencing an interop assembly. The latter one is given in the dependencies list. Unfortunately, I still get the unresolved reference error. Attached you find my log file.

Thanks a lot,
Mike

Sandcastle Help File Builder GUI, version 1.6.0.2
Build started at 28.11.2007 18:29:16

Clearing working folder...
Finding tools...
Found Sandcastle in 'C:\Program Files\Sandcastle\'
Found HTML 1.x help compiler in 'C:\Program Files\HTML Help Workshop\'
Validating documentation assembly information...
-------------------------------
Generating shared content files (en-US, Englisch (USA))...
Last step completed in 00:00:00.0200
-------------------------------
Copying documentation assembly dependencies...
C:\work\SCM-SVN-SWBK\tools\CustomCodeGen\simplifiers\ModelChecker\obj\Debug\Interop.rhapsody.dll -> C:\work\SCM-SVN-SWBK\tools\CustomCodeGen\simplifiers\ModelChecker\doc\Help\Working\DLL\Interop.rhapsody.dll
Last step completed in 00:00:00.0601
-------------------------------
Generating API filter for MRefBuilder...
Last step completed in 00:00:00.0501
-------------------------------
Generating reflection information...
C:\work\SCM-SVN-SWBK\tools\CustomCodeGen\simplifiers\ModelChecker\doc\Help\Working\GenerateRefInfo.bat
MrefBuilder (v2.3.8000.26)
Copyright ¸ Microsoft 2006
Info: Loaded 1 assemblies for reflection and 1 dependency assemblies.
Error: Unresolved assembly reference: Interop.rhapsody (Interop.rhapsody, Version=1.0.0.0, Culture=neutral) required by ModelChecker
Last step completed in 00:00:01.6129


BUILD FAILED: Unexpected error in last build step. See output above for details.
Coordinator
Nov 28, 2007 at 7:15 PM
Would it be possible for you to e-mail me the help file builder project and the assemblies so that I can test this? My e-mail address is in the About box and in the footer of the pages in the help file.

Eric
May 13, 2008 at 4:34 PM
Has this issue been resolved?  I am having the same problem and am not sure how to fix it.  Could someone post the fix if it has been solved?
Thanks.

Jeff
Coordinator
May 13, 2008 at 8:13 PM
I have to ask:  Did you add the assembly is says is missing to the Dependencies property as well as any other assemblies that it may depend on?

The issue above was caused by a reference to a type in an attribute that was in the dependent assembly which was in a sub-folder.  It was reported as a bug (http://www.codeplex.com/Sandcastle/WorkItem/View.aspx?WorkItemId=936).  Since it's a rare case, I doubt it applies to you.  The most likely cause is that you haven't got all the dependencies specified.

Eric
May 13, 2008 at 10:22 PM
I'm getting an "Unresolved assembly reference" resulting from the fact that SCHFB copies all stated dependency assemblies into the same temp working folder.  Here's my scenario:


I am documenting a set of class libraries resulting from many projects all found in a specific folder.

Project A depends on log4net 1.2.10  found in /log4net1210/log4net.dll

Project B depends on log4net 1.2.9 foundi n /log4net1209/log4net.dll

I pass both paths into SandcastleBuilderConsole as a -dependency, but the builder copies the log4net assemblies to /Help/Working/DLL/ overwriting with the latest one overwriting the first.  This causing an error when generating reflection info as the correct version is not available for each project.

Is there a way to recursively resolve dependencies in nested folders?
Coordinator
May 13, 2008 at 10:51 PM
A workaround for this situation would be to create two help projects: One for A and one for B.  Project B just acts as a container for the assemblies in that project.  Then use the Version Builder Plug-In to add Project B to Project A as a separate version/product .  This will let you build a single help file for both and since the versioned projects are built under a separate folder, it gets around the issue of the two dependency assemblies overwriting each other.

Eric