How do I get the the expected output from a TFS 2015 build (to match my XAML build)?

拜拜、爱过 提交于 2019-12-04 04:44:28

问题


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:

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:

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:

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

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

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!

Ben


回答1:


Update your build definition to below:

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

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




回答2:


vNext build and XAML build, it's totally different technology. There won't be any automated ways of converting.

The new builds are based on a different architecture and run on a completely different system.

So your situation is predictable, it's very hard to achieve a 100% conversion. Copy the folder in vNext will copy everything under the folder by default. Seems there are some customization during the copy or published in your XAML build which will return the result as above picture.

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.

And you could also take a look at these series of articles how to upgrade from XAML to Build 2015 with minimal changes.



来源:https://stackoverflow.com/questions/38979398/how-do-i-get-the-the-expected-output-from-a-tfs-2015-build-to-match-my-xaml-bui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!