“the outputpath property is not set for this proje

2019-01-16 10:59发布

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.

25条回答
The star\"
2楼-- · 2019-01-16 11:24

As Scott S, I've had to delete the "Platform" environment variable.

Then restart VS, and it's ok : no more error message...

查看更多
狗以群分
3楼-- · 2019-01-16 11:25

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.

查看更多
老娘就宠你
4楼-- · 2019-01-16 11:26

In my case the OutputPath was set property in the project files. But unloading, reloading and then rebuilding fixed it.

查看更多
来,给爷笑一个
5楼-- · 2019-01-16 11:27

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.

查看更多
一夜七次
6楼-- · 2019-01-16 11:27

I created a new project in a new solution which references to existing projects. This error occurs when I add an existing project (say project 1) and try to build without adding other projects that project 1 references to.

Just make sure all the relating projects are added to the new solution and the error disappears.

查看更多
Juvenile、少年°
7楼-- · 2019-01-16 11:27

I had the same error, so I looked on project settings and there in "Build" section is "Build output path" option. And value was empty. So I filled in "bin\" value a error disappeared. It solved my problem.

查看更多
登录 后发表回答