I am using Sandcastle to generate my documentation, but I am also using Codesmith to generate all my DTOs.  When I try to generate documentation against the DTO library I get the following error:

SHFB: Error BE0065: BUILD FAILED: The imported project "C:\Program Files\MSBuild\CodeSmith\CodeSmith.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  C:\projects\[dir]\[dir]\[dir]\my.project.file.csproj

The workaround is rather lame, but easily done.  I have to open the project file for the project that contains the CodeSmith generated content and remove the following line:

<Import Project="$(MSBuildExtensionsPath)\CodeSmith\CodeSmith.targets" />

 

Save it, and then rebuild your sandcastle project in the "Sandcastle Help File Builder GUI."

Don't forget to put that line BACK after you have generated your code.  Like I said, lame.