Aug 6, 2011 at 12:02 PM
Edited Aug 6, 2011 at 12:02 PM
I am having a similar problem. Everything was working fine with the script that I have to build documentation via the command line:
I want to run this on machines that have the Sandcastle files but where the install was not run, so I added a call to setx for SHFBROOT. On my test machine I deleted this environment variable and ran the script with setx and the call to MSBuild.
SHFBROOT has the same value that it had before I ran the script, but now the help wont build and I can't even create a new project in Sandcastle GUI
The error when I build is
Generating reflection information...[C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe]C:\MyProgram\Dev\MyProgramAdditions\API_Documentation\Build\Help\Working\GenerateRefInfo.proj(58,5): error MSB4062: The "SandcastleBuilder.Utils.MSBuild.MRefBuilder"
task could not be loaded from the assembly C:\MyProgram\Dev\MyProgramAdditions\API_Documentation\Build\Help\Working\ C:\MyProgram\Dev\ThirdParty\MyProgramAPI\Documentation\Sandcastle Help File Builder\\SandcastleBuilder.Utils.dll. Could not load file or assembly
'file:///C:\MyProgram\Dev\MyProgramAdditions\API_Documentation\Build\Help\Working\ C:\MyProgram\Dev\ThirdParty\MyProgramAPI\Documentation\Sandcastle Help File Builder\SandcastleBuilder.Utils.dll' or one of its dependencies. The filename, directory
name, or volume label syntax is incorrect. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
The Using task in the proj file is
<UsingTask TaskName="SandcastleBuilder.Utils.MSBuild.MRefBuilder" AssemblyFile="$(SHFBROOT)\SandcastleBuilder.Utils.dll" />
If I launch the Sandcastle GUI, click the New button, and enter a name, the error is
The imported project "C:\MyProgram\Dev\MyProgramAdditions\API_Documentation\Build\
C:\MyProgram\Dev\ThirdParty\MyProgramAPI\Documentation\Sandcastle Help File Builder\SandcastleHelpFileBuilder.targets" was not found.
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
So it feels like somehow I have messed up the entire computer's relationship with Sandcastle, though all that I think I did was delete and recreate the SHFBROOT variable with the same value it had previously.
Any help would be much appreciated.