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

93,154

Solution 1

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.

Solution 2

I have also seen this error when our build agent was configured to run platform "Any CPU" (with spaces as displayed in Visual Studio) rather than "AnyCPU" (one word as specified in the project file).

Solution 3

In our case we were running a build script on our HP developer boxes. HP have some environment variables they've set up for their own purposes and one of them is PLATFORM (used, apparently, for "HP Easy Setup").

Deleting the PLATFORM environment variable worked.

You could also future-proof your build script by specifying the platform, i.e.
msbuild /p:Platform=AnyCPU.

Solution 4

If Visual Studio specifically complains that "Platform='BPC'" then you can easily fix this by removing the "Platform" environment variable.

Delete this bad boy.

Now restart Visual Studio and you are good to go.

Solution 5

Like "Richard Dingwall" hinted, the problem is related to VS using the display version of "Any CPU" instead of the MSBuild version which actually reads "AnyCPU"

Go into Build/New Build Definition or Edit Build Definition -> Process -> Configurations to build, open the configuration selection dialog and in "Platform" instead of selecting "Any CPU", manually add "AnyCPU"

Share:
93,154
laconicdev
Author by

laconicdev

Updated on November 30, 2021

Comments

  • laconicdev
    laconicdev over 2 years

    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.