我如何从TFS 2015构建中获得预期的输出(以匹配我的XAML构建)? [英] How do I get the the expected output from a TFS 2015 build (to match my XAML build)?

查看:76
本文介绍了我如何从TFS 2015构建中获得预期的输出(以匹配我的XAML构建)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚升级到TFS2015(现场),我试图建立一个与xaml构建相同的构建,但是似乎无法构建相同的文件.这是我用来发布站点的xaml输出目录的图片.为此,我导航到build文件夹,然后深入到_PublishedWebsites \ BOTWSitecoreWeb文件夹:

We just upgraded to TFS2015 (onsite) and I'm trying to set up a build that will do the same thing as my xaml builds but I can't seem to get the same files built. Here's a picture of the xaml output directory that I use to publish the site. To get this I navigate to the build folder then drill down to the _PublishedWebsites\BOTWSitecoreWeb folder:

这是解决方案资源管理器的图片:

Here's a picture of the solution explorer:

因此您可以看到BOTWSitecoreWeb是我的启动项目,它构成了网站的基础.因此,要发布此网站,我只需将文件夹_PublishedWebsites \ BOTWSitecoreWeb复制到我的IIS目录中.使用xaml构建的外观如下:

So as you can see BOTWSitecoreWeb is my startup project and it forms the basis for the website. So to publish this website I simply copy the folder: _PublishedWebsites\BOTWSitecoreWeb to my IIS directory. Here's what it looks like using the xaml build:

如果我深入到Drops/Source/sc/Website文件夹中的TFS2015 build输出文件夹中,则会得到此文件,该文件和文件夹比我期望的要多得多:

And if I drill down into the TFS2015 build output folder into the Drops/Source/sc/Website folder I get this, which has many more files and folders than what I'm expecting:

所以我的问题是,如何从TFS2015构建的xaml构建中获得与当前相同的输出?

So my question is how can I get the same output that I currently get from my xaml builds from a TFS2015 build?

bin文件夹具有相同数量的文件,因此这是一个好的开始.这是xaml构建中的bin文件夹:

The bin folder has the same number of files, so that's a good start. Here's the bin folder from the xaml build:

这是TFS 2015构建中的bin文件夹.请注意,它们都有57个文件,我认为这是一件好事!

And here's the bin folder from the TFS 2015 build. Notice that they both have 57 files, which I assume is a good thing!

在此先感谢您提供的任何见解!

Thanks in advance for any insight you can provide!

推荐答案

将您的构建定义更新为以下版本:

Update your build definition to below:

  1. 在Visual Studio构建步骤中添加/p:DeployOnBuild=true /p:OutDir="$(build.artifactstagingdirectory)\\"自变量:
  2. 将发布构建工件"任务的发布路径"更改为"$(build.artifactstagingdirectory)_PublishedWebsites \ ProjectName":
  1. Add /p:DeployOnBuild=true /p:OutDir="$(build.artifactstagingdirectory)\\" arguments in Visual Studio Build step:
  2. Change "Path to Publish" of "Publish Build Artifacts" task to "$(build.artifactstagingdirectory)_PublishedWebsites\ProjectName":

保存构建定义并在构建过程中进行排队,现在您应该将与XAML构建相同的文件发布到放置文件夹中.

Save the build definition and queue a build, now you should get the same files published in drop folder like XAML build.

这篇关于我如何从TFS 2015构建中获得预期的输出(以匹配我的XAML构建)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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