This project has moved and is read-only. For the latest updates, please go here.

SHFB : error BE0065: BUILD FAILED: Modifying the XML of an imported project file is not allowed. Open that project file directly.

Topics: User Forum
Dec 16, 2009 at 12:29 AM
Edited Dec 16, 2009 at 11:29 PM


When trying to build help using SHFB for one of my solutions that imports another project I am getting the following error:

SHFB : error BE0065: BUILD FAILED: Modifying the XML of an imported project file is not allowed. Open that project file directly.

The line that is giving the error looks like this:

<Import Project="$(ProjectBasePath)\ProjectBase.Files" />

ProjectBase.Files is another MSBuild file.

I can find no help anywhere regarding this specific error.  As far as I know, SHFB shouldn't be attempting to modify any xml of any imports.  Any ideas on what the actual problem or solution might be?  Visual studio 2008 is able to build this project without error, so why is Sandcastle having a hard time with it?



Dec 16, 2009 at 8:13 PM

It's possible the imported project contains one of the common items that SHFB tries to set when loading a project such as Configuration, Platform, or one of the solution macros like SolutionDir, etc.  This doesn't affect regular projects but would in this case if it thinks it's trying to modify the imported project item.  Can you send me the Visual Studio solution file, the related Visual Studio project files it contains, and the SHFB project file?  I don't need any source code or anything else, just those files so that I can reproduce the problem and see if there is a fix or workaround.  My e-mail address is in the About box in the GUI and in the footer of the pages in the help file.  The workaround for the time being would be to add the project files individually if they don't use the import and for any that do, add the assemblies, comments files, and reference assemblies from them individually.



Jan 8, 2010 at 12:59 AM
EWoodruff wrote:

Hi Jeff,

 I was able to duplicate and fix the problem.  It was caused by references in the imported MPF project.  When a reference is cloned, it retains the imported flag and, because it’s a read-only property, it can’t be turned off.  As such, my fix was to ignore references that are marked as imported.  If necessary, the referenced assemblies can be added manually to the SHFB project’s References node.  I plan on releasing an update to SHFB that includes the fix in the next week or so.


I am including the results of our offline conversation for the benefit of anyone else experiencing this error.

I tried using the new SHFB and it worked like a charm.  Thanks for all your help.