visual-studio-2008msbuildbuildconfiguration

"the outputpath property is not set for this project" error


I have a multi project solution in Visual Studio 2008. I just added a new Configuration called Release-VersionIncrement to the solution, specifying "use release" configuration as baseline. All project files were updated with that configuration. However, when I am trying to compile a specific project using this configuration, I get the following error:

Error 5 The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Release-VersionIncrement' Platform='AnyCPU' C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets 539 9 DataConversion

What's happening here? The project compiles fine in Release or Debug configuration.


Solution

  • Usually this happens when the OutputPath property of the project file is blank. Project files are just MSBuild files. To edit in Visual Studio: Right click on the project, pick "Unload project" then right click on the unloaded project and select "Edit ...".

    Look for the Release-Versionincrement property group. It should look something like

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-VersionIncrement|AnyCPU' ">
      <OutputPath>bin\Release-VersionIncrement\</OutputPath>
      <DefineConstants>TRACE</DefineConstants>
      <Optimize>true</Optimize>
      <DebugType>pdbonly</DebugType>
      <PlatformTarget>AnyCPU</PlatformTarget>
      <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
      <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
      <ErrorReport>prompt</ErrorReport>
    </PropertyGroup>
    

    The important one there it the OutputPath, does it exist for your project file? If not add it and try again.