简体   繁体   English

错误“未为项目设置OutputPath属性” VS 2015

[英]Error “The OutputPath property is not set for project” VS 2015

I have multiple projects in visual studio 2015. I am running my project in "ANY CPU" in debug mode. 我在Visual Studio 2015中有多个项目。我在调试模式下的“ ANY CPU”中运行项目。 when I am trying to Run my project, I get the following error: 当我尝试运行我的项目时,出现以下错误:

The OutputPath property is not set for project '.csproj'. 未为项目“ .csproj”设置OutputPath属性。 Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. 请检查以确保为该项目指定了配置和平台的有效组合。 Configuration='Debug' Platform='x64'. 配置=“调试”平台=“ x64”。
This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. 如果某个其他项目试图遵循该项目的项目间引用,此项目已被卸载或未包含在解决方案中,并且引用项目未使用相同或等效项构建,则也可能会出现此错误。配置或平台。 C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\Microsoft.Common.CurrentVersion.targets C:\\ Program Files(x86)\\ MSBuild \\ 14.0 \\ bin \\ Microsoft.Common.CurrentVersion.targets

I just update the all the project solution into x64 then solution building fine. 我只是将所有项目解决方案更新为x64,然后解决方案构建良好。

在此处输入图片说明

For me, the problem was in the package 对我来说,问题出在包装上

Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0 Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0

Nuget only fetched ' Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0.nupkg ' and didnt add the folders ' build ', and ' tools '. Nuget只获取了“ Microsoft.VisualStudio.Azure.Fabric.MSBuild.1.4.0.nupkg ”,没有添加文件夹“ build ”和“ tools ”。 And therefore didn't have ' Microsoft.VisualStudio.Azure.Fabric.Application.props '. 因此没有“ Microsoft.VisualStudio.Azure.Fabric.Application.props ”。

Once added from an backup (didnt help restoring), I just rebuilt the project and it worked like a charm! 一旦从备份中添加(帮助恢复),我就重新构建了该项目,它的工作就像一个魅力!

Wasn't the most obvious error-message. 这不是最明显的错误消息。

Hope this helps someone. 希望这对某人有帮助。

May by you mean "ANY CPU" is the solution configuration? 您的意思是解决方案配置为“ ANY CPU”吗? Enter to " Build\\Configuration Manager " and check "Configuration" and "Platform" for you '.csproj'. 输入“ Build \\ Configuration Manager ”,然后为“ .csproj”检查“ Configuration”和“ Platform”。 Also try to check " <OutputPath></OutputPath> " in all of you cs project files. 另外,尝试在所有CS项目文件中检查“ <OutputPath></OutputPath> ”。 Also look which platform will be set if $(Platform) is null: 还要查看如果$(Platform)为null时将设置哪个平台:

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU(may be x64 here)</Platform>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建新项目或打开项目时出现 VS 2015 错误“对象引用未设置到对象的实例”? - VS 2015 Error “Object reference not set to an instance of an object” when creating a new project or opening a project? VS 2015 MSBuild部署数据库项目错误 - VS 2015 MSBuild Deploy Database Project Error 设置本地主机端口固定/静态以在vs2015中进行项目调试 - Set localhost port fixed/static for project debugging in vs2015 使用平台集vs2013(v120)编译vs2015项目时,如何解决错误MSB6003? - How to solve error MSB6003 when compile vs2015 project with platform set vs2013(v120)? vNext项目编译时VS 2015“依赖无法解决”错误 - VS 2015 “Dependency could not be resolved” error on vNext project compilation vs2015在解决方案资源管理器中右键单击项目时出现错误 - vs2015 Error when right clicking project in solution explorer 在VS 2015中创建Xamarin.Android项目时出错 - Error when creating Xamarin.Android project in VS 2015 在vs 2015社区中创建新项目时出错 - Error During creating new project in vs 2015 Community VS 2015和Angular2 RC Typescript虚拟项目错误 - VS 2015 & Angular2 RC Typescript Virtual Project error VS2015安装项目错误80040154未注册类 - VS2015 Setup project error 80040154 Class not registered
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM