在VSTS生成中(对于ASP.net项目)没有生成任何包,因此该发行版本失败了,为什么? [英] No package generated in VSTS build (for ASP.net project), so that release failed, why?

查看:105
本文介绍了在VSTS生成中(对于ASP.net项目)没有生成任何包,因此该发行版本失败了,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft Team Foundation Server 2018的构建任务来构建Asp.net项目,然后将其部署到Microsoft Azure网站.

I'm using Microsoft team foundation server 2018's build task to build the Asp.net project and then deploy it to Microsoft Azure Website.

以下MsBuild命令应将网站发布到构建代理的工件目录中的发布包中:

The following MsBuild command should publish the website to a publishing package in the build agent's artifact directory:

"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"

构建成功,但是,未生成任何软件包,因此下一个发布作业失败,并显示

The build succeeded, however, there is no package generated, so the next release job failed with

'2017-12-02T07:36:56.2618898Z ## [警告]文件夹"C:\ agent_work \ 8 \ a"为空.不会将任何内容添加到放置文件夹.

'2017-12-02T07:36:56.2618898Z ##[warning]Folder "C:\agent_work\8\a"is empty。no content will be added to drop folder。

推荐答案

要构建ASP.NET网站项目,应在Visual Studio构建任务中构建*.publishproj而不是*.sln

To build ASP.NET website project, you should build *.publishproj instead of *.sln in Visual Studio build task

在构建定义中->为Visual Studio构建任务取消链接**\*.sln->指定*.publishproj文件的路径->保存并再次构建.

In your build definition -> unlink **\*.sln for Visual Studio build task -> specify the path to *.publishproj file -> save and build again.

这篇关于在VSTS生成中(对于ASP.net项目)没有生成任何包,因此该发行版本失败了,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆