What is the purpose of the Binaries \ _PublishedWebsites directory in the TFS build section

TFS creates the publication directory in the working directory of the assembly agent:

Z:\TFSBuilds\1\box\CT\Binaries\\_PublishedWebsites 

I assume that this is where TFS automatically publishes the site. How can I use it to automatically publish sites ... since we must link to my IIS website in this directory. What is his purpose?

+4
source share
1 answer

First, a working directory by name is called a "working" directory. This is where the build agent downloads the source code, compiles, etc. It also cleans the working directory whenever you start the assembly again, so you run the risk of capturing incomplete artifacts when trying to get from the working directory.

TFS defines a β€œdelete folder” that will copy the final artifacts after the build is complete. You can specify the delete folder for the assembly by editing its assembly definition:

  • Right-click on the assembly and select "change assembly definition."
  • Select the Default Build section.
  • Tick ​​'This assembly copies the output files to the folder folder
  • Enter the UNC path for the assembly agent to copy artifacts (make sure the assembly agent has access to this UNC path!)

Secondly, regarding _PublishedWebsites. The build agent will create the _PublishedWebsites folder for each web project that it creates as part of its build artifacts (so if you tell it that you want to build a solution with two web projects, it will create [Project name A] \ _ PublishedWebsites and [Project Name B] \ _ PublishedWebsites). Inside each _PublishedWebsites folder is the content that you want to delete in the IIS application, just like you, by right-clicking on a web project and selecting Publish. I usually add the last step to the build workflow to copy the contents of this _PublishedWebsites folder to the correct IIS directory.

This link describes how to add copy workflow: TFS 2010: Copy _PublishedWebsites for server testing

And here's more about dropping folders: http://msdn.microsoft.com/en-us/library/bb778394.aspx

+11
source

Source: https://habr.com/ru/post/1394185/


All Articles