簡體   English   中英

Visual Studio生成:sfproj未為項目設置OutputPath屬性

[英]Visual Studio build: sfproj The OutputPath property is not set for project

我正在嘗試使用VSTS使用4.6.1 .net核心應用程序構建解決方案。 我將構建配置為安裝NuGet 4.3.0並使用nuget restore。 之后,我嘗試使用Visual Studio Build進行構建,並且得到Service Fabric .sfproj文件標題中的錯誤。

當使用與VSTS幾乎相同的設置在本地運行MSBuild時,所有這些方法均有效。

這些命令在本地工作:

nuget.exe restore "MySolution.sln" -Verbosity Detailed -NonInteractive

msbuild.exe "MySolution.sln" /nologo /nr:false /p:AddCorrelationIds=false /p:platform="x64" /p:configuration="release" /p:VisualStudioVersion="15.0"

謝謝!

確保已還原NuGet包Microsoft.VisualStudio.Azure.Fabric.MSBuild

對我來說,運行msbuild /t:Restore還不夠。 除此以外,還必須運行它:

$projects = Get-ChildItem -Path $RootFolder -Include *.sfproj -Recurse
foreach ($project in $projects)
{
    Write-Host "Restoring NuGet packages for project $project"

    & nuget.exe restore "$project"

    if ($LastExitCode -ne 0)
    {
        return $LastExitCode
    }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM