项目编译报错 未配置输出路径

来源:互联网 发布:php开发流程 编辑:程序博客网 时间:2024/06/15 23:57



错误 1 error : The OutputPath property is not set for project 'sortAlgorithm.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='Win32'.  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\12.0\bin\Microsoft.Common.CurrentVersion.targets6155sortAlgorithm




参考:

一个解决方案  http://blog.csdn.net/chao88552828/article/details/49336661


第二个回答 


第三个答案


将自己的配置文件  在 project 后头 后面进行 增加 如下代码 :   无效果。

  <PropertyGroup Condition=" '$(Configuration)' == 'MyConfig' ">
    <OutputPath>.\Debug\</OutputPath>
  </PropertyGroup>



修改myconfig  后 如下,  仍然无效


  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <OutputPath>.\Debug\</OutputPath>
  </PropertyGroup>



弄了一圈也没有解决好,。

发现 项目属性——配置——常规——输出目录里面   不知道啥时候可能被自己给弄没了, 并且当时 弄没 位置 是属性管理器的 配置。

属性管理器属于  对所有新建项目的最基本的配置,,,   因此把这个弄没了,  那么新建什么项目都会出现上面的问题。 



将属性管理器的  通用属性---常规---输出目录 进行设置如下:     $(OutDir)$(TargetName)$(TargetExt)     或者  $(SolutionDir)$(ConfigurationName)

报错消失! 



参考 官网  说明 :


https://msdn.microsoft.com/zh-cn/library/8x480de8(v=vs.120).aspx











原创粉丝点击