我正在使用 Microsoft Team Foundation Server 2018 的构建任务来构建 Asp.net 项目,然后将其部署到 Microsoft Azure 网站。
以下 MsBuild 命令应将网站发布到构建代理的工件目录中的发布包:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe"
"C:\agent\_work\8\s\Altoro.sln" /nologo /nr:false /dl:CentralLogger,"C:\agent\_work\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.119.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=9ac05cfe-e8e9-42b6-a469-24e84f79ebe9|SolutionDir=C:\agent\_work\8\s"*ForwardingLogger,"C:\agent\_work\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.119.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true
/p:SkipInvalidConfigurations=true /p:PackageLocation="C:\agent\_work\8\a\\"
/p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="15.0"
/p:_MSDeployUserAgent="TFS_2386aba1-5b25-4025-ba06-4677ece9a429_build_8_125"
构建成功,但是没有生成包,所以下一个发布作业失败了
'2017-12-02T07:36:56.2618898Z ##[警告]文件夹“C:\agent_work\8\a”为空。不会向放置文件夹添加内容。</p>