我们刚刚升级到 TFS2015(现场),我正在尝试设置一个构建,该构建将执行与我的 xaml 构建相同的操作,但我似乎无法构建相同的文件。这是我用来发布网站的 xaml 输出目录的图片。为此,我导航到构建文件夹,然后深入到 _PublishedWebsites\BOTWSitecoreWeb 文件夹:
![enter image description here](https://i.stack.imgur.com/gwFV9.jpg)
这是解决方案资源管理器的图片:
![enter image description here](https://i.stack.imgur.com/PjhR5.jpg)
正如您所看到的,BOTWSitecoreWeb 是我的启动项目,它构成了网站的基础。因此,要发布此网站,我只需将文件夹:_PublishedWebsites\BOTWSitecoreWeb 复制到我的 IIS 目录。使用 xaml 构建的效果如下:
![enter image description here](https://i.stack.imgur.com/8ZgJ6.jpg)
如果我深入到 TFS2015 构建输出文件夹到 Drops/Source/sc/Website 文件夹,我会得到这个,其中的文件和文件夹比我预期的要多得多:
![enter image description here](https://i.stack.imgur.com/SfAzD.jpg)
所以我的问题是如何获得与当前从 TFS2015 构建的 xaml 构建中获得的相同输出?
bin 文件夹具有相同数量的文件,因此这是一个好的开始。这是 xaml 构建中的 bin 文件夹:
![enter image description here](https://i.stack.imgur.com/bRWiS.jpg)
这是 TFS 2015 版本的 bin 文件夹。请注意,它们都有 57 个文件,我认为这是一件好事!
![enter image description here](https://i.stack.imgur.com/UtSnF.jpg)
预先感谢您提供的任何见解!
Ben
将您的构建定义更新为以下内容:
- Add
/p:DeployOnBuild=true /p:OutDir="$(build.artifactstagingdirectory)\\"
arguments in Visual Studio Build step:
- Change "Path to Publish" of "Publish Build Artifacts" task to "$(build.artifactstagingdirectory)_PublishedWebsites\ProjectName":
保存构建定义并对构建进行排队,现在您应该像 XAML 构建一样在放置文件夹中发布相同的文件。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)