gpt4 book ai didi

MSBuild 创建 sfproj 包失败 : The OutputPath property is not set for project

转载 作者:行者123 更新时间:2023-12-02 21:23:36 25 4
gpt4 key购买 nike

我使用以下命令行:

"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" MyApp.sln /p:configuration="Release" /t:Build
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" MyApp.sfproj /p:platform="Any CPU" /p:configuration="Release" /t:Package

第一行工作正常,但第二行失败并出现错误

"MyApp.sfproj" (Package target) (1) ->
"AppProj.csproj" (default target) (4) ->
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(724,5): error : The OutputPath property is not set for project 'AppProj.csproj'.
Please check to make sure that you have specified a validcombination of Configuration and Platform for this project.
Configuration='Release' Platform='Any CPU'.
You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default
Configuration or Platform that doesn't exist for this project. [AppProj.csproj]

对于我的应用程序中的一些项目。

我在相关 csproj 中定义了以下 PropertyGroup:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

当我从 VS2015/2017 部署应用程序时,它运行良好,并且按预期创建了 bin\pkg

最佳答案

当我尝试在 VSTS 上构建时,将 Microsoft.VisualStudio.Azure.Fabric.MSBuild 升级到 1.6.3(从 1.6.1)后遇到了同样的问题。

我通过将所有目标平台更改为“任何 CPU”(之前为“x64”)来修复此问题。

参见https://github.com/Azure/service-fabric-issues/issues/64#issuecomment-323942996 .

关于MSBuild 创建 sfproj 包失败 : The OutputPath property is not set for project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45659836/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com