“没有为此项目设置输出路径属性"错误 [英] "the outputpath property is not set for this project" error

查看:31
本文介绍了“没有为此项目设置输出路径属性"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 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:WINDOWSMicrosoft.NETFrameworkv3.5Microsoft.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:WINDOWSMicrosoft.NETFrameworkv3.5Microsoft.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>binRelease-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.

这篇关于“没有为此项目设置输出路径属性"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆