Problems using Sandcastle with Team Build 2008

Topics: Developer Forum, User Forum
Feb 18, 2009 at 3:12 PM
Edited Feb 18, 2009 at 3:16 PM
I am trying to get Sandcastle to work with my Team Builds in TFS 2008.  I keep getting errors.  I first got errors that seemed to be related to the %DXROOT% reference in the mrefbuilder.config file.  So, I changed this path the the absolute path and removed the environment variable. That just took me to the next error...

The error that is currently blocking is this:

EXEC : error : The type 'Microsoft.Ddue.Tools.Reflection.AssemblyResolver' in the component assembly 'c:\program files\sandcastle\ProductionTools\MRefBuilder.exe' is not a component type.
C:\Program Files\MSBuild\Sandcastle.targets(26,5): error MSB3073: The command "mrefbuilder.exe C:\Users\svcTFS\AppData\Local\Temp\Portal\Portal Nightly Build\BuildType\..\Sources\..\Binaries\Debug\*.dll /out:C:\Users\svcTFS\AppData\Local\Temp\Portal_\reflection.org /dep:" exited with code 1.
Done executing task "Exec" -- FAILED.

Also, this command seems to work from the command line on the server.

Has anyone seen this error?  What is the fix?

Thanks for any help you can provide.

David

Coordinator
Feb 18, 2009 at 4:21 PM
You shouldn't remove DXROOT as it is used in a number of places.  The most common cause of problems with DXROOT is that it isn't pointing to the right place.  Make sure there isn't a user copy of the DXROOT environment variable.  If there is, delete it.  Add a system copy of the DXROOT environment variable and make sure it points to the right location.

Are you really using the Sandcastle Help File Builder?  The error above doesn't look like anything that SHFB would produce and it doesn't contain a Sandcastle.targets file.  The latest release contains a SandcastleHelpFileBuilder.targets file but it wouldn't produce any errors like the one you've posted.  There is a help topic in the SHFB help file on getting it and Sandcastle to work with TFS.  You might want to reinstall Sandcastle to undo any changes you've made, install SHFB if you haven't done so already, and follow the instructions in the help topic.  Post back here if you have any questions or problems after doing that.

Eric
Feb 18, 2009 at 8:01 PM
Okay.  Thanks for the information.  I installed the right stuff and followed the steps in the help file and it seems to be working now.  But I am having two issues.  The first is getting the summary comments to show in the generated files. I changed the setting on the project, but I still get  "No XML comments files found. The help file will not contain any member comments"   and the help file has the red error message stating that the summary comments were missing.

The second problem I am having is figuring out how to include the generated file in the packaged build.  Is there any guidance on how to do that?

Thanks for your help,

David
Coordinator
Feb 18, 2009 at 8:16 PM
Did you add a Visual Studio solution or project file as a documentation source?  If so, there's an issue where it doesn't pick up the XML comments file from the project.  There's a work item open for it and I'll fix it soon.  The workaround for now is to add the XML comments file as a documentation source by itself.

I'm not familiar with a "packaged build".  If it's part of TFS, you may be able to use one or more of the output parameters from the SHFB build to get the list of help files produced (Help1Files, Help2Files, WebsiteFiles, or AllHelpFiles).

Eric
Feb 18, 2009 at 8:27 PM
I did add the solution as a documentation source.  I just tested one other thing - adding a normal class library type project and it picked up the XML documentation for that.  The first project (that is not working) is a web site type project. I'm guessing there's somehitng special I need to do to get that to work.  I think I read a topic about that in the help files.

About the packaged build, I just expected the compiled help file to be copied to the output location of the build, but it was not. It was left under the "users" temp directory of the build identity.  Is there something special I need to do in order to get the help file to be copied?

Thanks for your help,

David
Coordinator
Feb 19, 2009 at 2:55 AM
Edited Feb 19, 2009 at 2:57 AM
For website projects, see the Documenting Web Projects help topic.  You'll need the custom code providers mentioned in the topic to produce the XML comments for the website project.  The compiled help output is left in the folder defined by the project's OutputPath property.  By default, that is a .\Help folder under the folder containing the SHFB project file.  I don't have access to a TFS setup so I can't really do any testing or make any recommendations with regard to it.

Something you might try is to override the OutputPath property in the task that builds the help file (i.e. add "OutputPath=$(OutDir)\Help" to the Properties parameter of the MSBuild task.  I'd definitely specify a subfolder after "$(OutDir)" if building website output so that it doesn't wipe out the other content of the build folder.  I may be able to simulate it with a project containing an MSBuild task that builds a SHFB project so if you can't figure it out, let me know and I'll see what I can do.

Eric