The OutputPath property is not set for this project

Dec 27, 2008 at 12:12 PM
I've done a clean install of VS 2008 and Sandcastle on to a new Windows Vista laptop, copied over my sources from my old Win/XP system and, when I run a build of the documentation, I get the following error generated:

Generating reflection information...
[C:\Windows\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe]
__________________________________________________
Project "D:\Projects\Libraries\LibraryDocs\Working\GenerateRefInfo.proj" (default targets):

C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(490,9): error : The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration=''  Platform='MCD'
Done building project "GenerateRefInfo.proj" -- FAILED.
    Last step completed in 00:00:00.1740
Can anyone suggest why this might be? I'me using the Sandcastle Help File Builder GUI version 1.8.0.0.

The help documentation has been built before on the other laptop. I've recompiled everything and started with a new Sandcastle project. The error seems to refer to the project that Sandcastle is generating, so I'm not sure how I influence that.

Thanks
Steve
Dec 27, 2008 at 3:40 PM
I have no idea whether what I have done is dangerous or whether I've damaged VS in any way,
so you may not want to follw me, but I have this working now.

What I did (once I could get permissions on Vista) was to edit the Microsoft.Common.Targets file
in \Windows\Microsoft.Net\v2.0.50270 to add a couple of lines. There is a block of code that
deals with invalid configurations... I modified this to be:

    <!-- SAB Force output path -->   
    <PropertyGroup Condition=" '$(OutputPath)' == '' ">
        <!--
        A blank OutputPath at this point means that the user passed in an invalid Configuration/Platform
        combination.
        -->
        <OutputPath>.\Output</OutputPath>
    </PropertyGroup>
    <!-- End of change -->

This provides an output path of some sort regardless of configuration. This seems to have done the trick.

No idea wht this is necessary, but it works, so I'm (mostly) happy.

Steve
Coordinator
Dec 27, 2008 at 9:20 PM
You'd probably be better off figuring out why the error occurred rather than messing with the common targets files.  The problem appears to be related to the values of the Configuration and Platform options within one of the projects.  If you search Google for OutputPath and "not set", you'll find lots of hits.  Most seem to indicate a problem with a solution or project file not having the values set properly.  Worst case, just add the assemblies, XML comments files, and references to the SHFB project rather than letting it try to infer them from the solution and/or project file.

Eric
Dec 28, 2008 at 3:59 PM
Sorry, there were comments after the error messages in my first post, but they don't seem to have come out.

The bit you missed (and I guess this is a vital bit), is that I get this error for EVERY project that I try to create
documentation for. While I might accept that I have an issue with one or two assemblies, I've tried to
generate documentation for six different assemblies and they all give me this error message, whether
I try to generate a single help file per assembly, or try to generate a single help file for multiple
assemblies.

All of the projects compile without problem individually and none are capable of generating
help files.

Steve