“未为此项目设置outputpath属性";错误 [英] "the outputpath property is not set for this project" error
问题描述
我在Visual Studio 2008中有一个多项目解决方案.我刚刚在解决方案中添加了一个名为Release-VersionIncrement的新配置,将使用发行版"配置指定为基准.所有项目文件都使用该配置进行了更新.但是,当我尝试使用此配置编译特定项目时,出现以下错误:
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:
错误5 OutputPath属性不是 为此项目设置.请检查 确保您指定了一个 有效的配置/平台 组合. 配置='发布版本增量' Platform ='AnyCPU'C:\ WINDOWS \ Microsoft.NET \ Framework \ v3.5 \ Microsoft.Common.targets 539 9 DataConversion
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
这是怎么回事?该项目可以在Release或Debug配置中很好地编译.
What's happening here? The project compiles fine in Release or Debug configuration.
推荐答案
通常,当项目文件的OutputPath属性为空时,会发生这种情况.项目文件只是 MSBuild 文件.要在Visual Studio中进行编辑,请执行以下操作:右键单击项目,选择卸载项目",然后右键单击已卸载的项目,然后选择编辑...".
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 ...".
查找Release-Versionincrement属性组.看起来应该像
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>
其中最重要的一个是OutputPath,它是否存在于您的项目文件中?如果没有添加,请重试.
The important one there it the OutputPath, does it exist for your project file? If not add it and try again.
这篇关于“未为此项目设置outputpath属性";错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!