简体   繁体   English

VSTS上的持续集成-构建定义:无文件-System.AggregateException

[英]Continuous Integration on VSTS - Build Definition: No Files - System.AggregateException

I am using Visual Studio Team Services. 我正在使用Visual Studio Team Services。 I created a Simple ASP.NET website and created my Build definition which contains default settings. 我创建了一个简单的ASP.NET网站,并创建了包含默认设置的Build定义。

在此处输入图片说明

After committing changes, the build is triggered using CI. 提交更改后,将使用CI触发构建。 The " Build Solution " Step works fine, however no files are found in the Copy Files Step: 构建解决方案 ”步骤可以正常工作,但是在“ 复制文件”步骤中找不到文件

在此处输入图片说明

I have created the same build definition for a simple console app, and the build and release are working. 我已经为一个简单的控制台应用程序创建了相同的构建定义,并且该构建和发行版正在正常工作。

When Creating a release from this build, it fails to deploy (i guess because no files are found in (Build process)) and gives the following error: 从此版本创建发行版时,它无法部署(我猜是因为在(生成过程)中找不到文件),并出现以下错误:

在此处输入图片说明

When you build Asp.Net project with a default VSBuild definition, the folder bin\\$(BuildConfiguration)\\ does not exist. 当您使用默认的VSBuild定义构建Asp.Net项目时,文件夹bin\\$(BuildConfiguration)\\不存在。 So "Copy Files" task cannot find any files with the default settings. 因此,“复制文件”任务无法找到具有默认设置的任何文件。 A simple way to fix your issue is add /p:outdir=$(build.artifactstagingdirectory) in "MSBuild Arguments" for VSBuild task as following: 解决问题的一种简单方法是在VSBuild任务的“ MSBuild参数”中添加/p:outdir=$(build.artifactstagingdirectory) ,如下所示:

将自定义参数添加到MsBuild

And you can also remove "Copy Files" task since "Publish Build Artifacts" task publishes the files in $(build.artifactstagingdirectory) folder by default and you have set the build output to that folder with the argument added in VSBuild task. 您还可以删除“复制文件”任务,因为默认情况下,“发布构建工件”任务$(build.artifactstagingdirectory)文件发布到$(build.artifactstagingdirectory)文件夹中,并且您已在VSBuild任务中添加了带有自变量的构建输出。

Update: You can add a "Copy Files" task with the following settings to copy "roslyn" folder to "bin" folder: 更新:您可以使用以下设置添加“复制文件”任务,以将“ roslyn”文件夹复制到“ bin”文件夹: 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM