如何从 TFS 2015 构建中获得预期输出(以匹配我的 XAML 构建)?
How do I get the the expected output from a TFS 2015 build (to match my XAML build)?
我们刚刚升级到 TFS2015(现场),我正在尝试建立一个与我的 xaml 构建相同的构建,但我似乎无法构建相同的文件。这是我用来发布站点的 xaml 输出目录的图片。为此,我导航到构建文件夹,然后深入到 _PublishedWebsites\BOTWSitecoreWeb 文件夹:
这是解决方案资源管理器的图片:
如您所见,BOTWSitecoreWeb 是我的启动项目,它构成了网站的基础。因此,要发布此网站,我只需将文件夹:_PublishedWebsites\BOTWSitecoreWeb 复制到我的 IIS 目录。这是使用 xaml 构建时的样子:
如果我深入到 Drops/Source/sc/Website 文件夹中的 TFS2015 构建输出文件夹,我会得到这个,其中的文件和文件夹比我预期的要多:
所以我的问题是如何获得与我当前从 TFS2015 构建的 xaml 构建相同的输出?
bin 文件夹中的文件数量相同,这是一个好的开始。这是 xaml 构建中的 bin 文件夹:
这是 TFS 2015 版本中的 bin 文件夹。请注意,它们都有 57 个文件,我认为这是一件好事!
提前感谢您提供的任何见解!
本
vNext 构建和 XAML 构建,这是完全不同的技术。不会有任何自动转换方式。
The new builds are based on a different architecture and run on a
completely different system.
所以你的情况是可以预见的,很难做到100%的转化。复制vNext中的文件夹默认会复制文件夹下的所有内容。似乎在您的 XAML 构建过程中进行了一些自定义或发布,这将 return 结果如上图。
If you have heavily customized XAML builds and custom activities, you
can continue using those builds until you are ready to port your
business logic into scripts that can run in the new builds.
你也可以看看这些系列文章how to upgrade from XAML to Build 2015 with minimal changes。
将您的构建定义更新为以下内容:
- 在 Visual Studio 构建步骤中添加
/p:DeployOnBuild=true /p:OutDir="$(build.artifactstagingdirectory)\"
个参数:
- 将 "Publish Build Artifacts" 任务的 "Path to Publish" 更改为“$(build.artifactstagingdirectory)_PublishedWebsites\ProjectName”:
保存构建定义并排队构建,现在您应该在 drop 文件夹中发布与 XAML 构建相同的文件。
我们刚刚升级到 TFS2015(现场),我正在尝试建立一个与我的 xaml 构建相同的构建,但我似乎无法构建相同的文件。这是我用来发布站点的 xaml 输出目录的图片。为此,我导航到构建文件夹,然后深入到 _PublishedWebsites\BOTWSitecoreWeb 文件夹:
这是解决方案资源管理器的图片:
如您所见,BOTWSitecoreWeb 是我的启动项目,它构成了网站的基础。因此,要发布此网站,我只需将文件夹:_PublishedWebsites\BOTWSitecoreWeb 复制到我的 IIS 目录。这是使用 xaml 构建时的样子:
如果我深入到 Drops/Source/sc/Website 文件夹中的 TFS2015 构建输出文件夹,我会得到这个,其中的文件和文件夹比我预期的要多:
所以我的问题是如何获得与我当前从 TFS2015 构建的 xaml 构建相同的输出?
bin 文件夹中的文件数量相同,这是一个好的开始。这是 xaml 构建中的 bin 文件夹:
这是 TFS 2015 版本中的 bin 文件夹。请注意,它们都有 57 个文件,我认为这是一件好事!
提前感谢您提供的任何见解!
本
vNext 构建和 XAML 构建,这是完全不同的技术。不会有任何自动转换方式。
The new builds are based on a different architecture and run on a completely different system.
所以你的情况是可以预见的,很难做到100%的转化。复制vNext中的文件夹默认会复制文件夹下的所有内容。似乎在您的 XAML 构建过程中进行了一些自定义或发布,这将 return 结果如上图。
If you have heavily customized XAML builds and custom activities, you can continue using those builds until you are ready to port your business logic into scripts that can run in the new builds.
你也可以看看这些系列文章how to upgrade from XAML to Build 2015 with minimal changes。
将您的构建定义更新为以下内容:
- 在 Visual Studio 构建步骤中添加
/p:DeployOnBuild=true /p:OutDir="$(build.artifactstagingdirectory)\"
个参数: - 将 "Publish Build Artifacts" 任务的 "Path to Publish" 更改为“$(build.artifactstagingdirectory)_PublishedWebsites\ProjectName”:
保存构建定义并排队构建,现在您应该在 drop 文件夹中发布与 XAML 构建相同的文件。