Unresolved assembly reference error in SandCastleHelpfileBuilder 1.8.0.3

Jun 15, 2010 at 6:47 AM

hi,

I am getting the Unresolved assembly reference error for my reference dll.  My documentation source dll and the reference dll are in different location.

Eg. documentaion source in D:\Helpfile\My.Dll

Reference dll : E:\MyReff\Ref.dll. . For the reference dll, i have created an environmemtal varibale and i use that environmental variable in the .shfb project. Below are the sample entries in the .shfb project.

DocumentationSources>
      <DocumentationSource sourceFile="D:\Helpfile\My.Dll" />
       <DocumentationSource sourceFile=" D:\Helpfile\My.xml"/>
</DocumentationSources>

<ItemGroup>
    <Reference Include="Ref">
      <HintPath>%MyEnvVariable%\Ref.dll</HintPath>
    </Reference></ItemGroup>

in the above case i am getting the unresolved assembly reference issue.  If i refer the source file also from an environment varibale like below, its works without any error.

DocumentationSources>
      <DocumentationSource sourceFile="%DocEnvVaribale%\My.Dll" />
       <DocumentationSource sourceFile=" %DocEnvVariable%\My.xml"/>
</DocumentationSources>

<ItemGroup>
    <Reference Include="Ref">
      <HintPath>%MyEnvVariable%\Ref.dll</HintPath>
    </Reference></ItemGroup>

Could you please let me know why this happend and how can i use the first scenario wothout getting the unresolved assembly reference errror. Or do i need to stick on the second approach.
 

 

Coordinator
Jun 17, 2010 at 7:21 PM

I tried it out and did find a bug in the way it's handling the hint path on references that contain environment variables.  Right now it's prefixing them with the project path so it won't find them and they'll be ignored.  I'm not sure why it would work in the second example since it would have the same issue.  It's fixed for the next release.  Also, in order for it to work correctly, you need to use the MSBuild style variable notation on the reference hint path (i.e. $(MyEnvVariable)\Ref.dll).  As a temporary work around you can use a relative path (i.e. ..\..\..\OtherFolder\Ref.dll) or just hard code it for the time being.

Eric

Jun 18, 2010 at 1:39 PM

Hi Eric,

Thanks for the reply. As per our req we had to use the first approach. so now we will use the relative path.

The second approach works in my machine. But the same does not work in another machine with same configuration(xp, 32 bit) and with the same version of sandcastle help file builder(1.8.0.3)

strange, but true.

Binnet.