SHFB: Error BE0065: The imported project [...] was not found.

Topics: Developer Forum, Project Management Forum
Nov 30, 2009 at 12:39 PM

Hi,

I try to use Sandcastle with the Builder GUI. After adding a project to the project explorer of SHFB and pressing the "Build" button, I receive the following:

 

 

-------------------------------
[Sandcastle Help File Builder Utilities, version 1.8.0.2]
Creating output and working folders...
-------------------------------
Clearing working folder...
-------------------------------
Finding tools...
Found Sandcastle in 'C:\Program Files (x86)\Sandcastle\'
Found HTML 1.x help compiler in 'C:\Program Files (x86)\HTML Help Workshop\'
-------------------------------
Validating and copying documentation source information
Source: Y:\Documents\Visual Studio 2008\Projects\Tutorial3D\Tutorial3D.csproj
    Found project 'Y:\Documents\Visual Studio 2008\Projects\Tutorial3D\Tutorial3D.csproj'
    Last step completed in 00:00:00.0170
-------------------------------

SHFB: Error BE0065: BUILD FAILED: The imported project "C:\Program Files\MSBuild\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  Y:\Documents\Visual Studio 2008\Projects\Tutorial3D\Tutorial3D.csproj

I'm working on a Window7 64bit system, while the imported target file"C:\Program Files\MSBuild\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" actually does not exist, it resides in the "x86" program files directory: "C:\Program Files (x86)\MSBuild\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets"

After I changed my csproj file from

 

<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />

to

<
Import Project="$(MSBuildExtensionsPath32)\Microsoft\XNA Game Studio\Microsoft.Xna.GameStudio.targets" />


I'm getting another error message:

SHFB: Error BE0067: Unable to obtain assembly name from project file 'Y:\Documents\Visual Studio 2008\Projects\Tutorial3D\Tutorial3D.csproj' using Configuration 'Debug', Platform 'AnyCPU'

Any suggestions?

Thanks,

Bob

 

 

Coordinator
Nov 30, 2009 at 7:40 PM

The problem with the targets file is caused by the way MSBuild searches for them depending on whether it's running the 32-bit or 64-bit version of MSBuild.  The suggested solution from Microsoft is to make sure the targets file exists in both the \Program Files\MSBuild and the \Program Files (x64)\MSBuild folders.

Regarding it not finding the assembly, note that it is using the "Debug" and "AnyCPU" configurations.  If your project is using a custom configuration or platform setting, you'll need to define them by setting them on the documentation source's properties in the Project Explorer window.  SHFB only knows about Debug and Release configurations by default and will use the options set on the toolbar when it does a build.  If building from the command line, it uses the option passed to it from there or Debug|AnyCPU if not defined.  You can override this behavior by specifying the configuration and platform explicitly on the documentation source. 

Eric

 

Dec 1, 2009 at 7:21 AM

Hello EWoodruff,

thanks for your detailed replay, this helped me a lot to understand. After setting the documentation source's properties right (my project's plattform is 'x86', not 'AnyComputer'), everythings runs well!

Thanks,

Bob