¿Cuál es el propósito del directorio Binaries \ _PublishedWebsites bajo la compilación TFS?

TFS generates a publish directory under the build agent working directory:

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

I am supposing that this is where TFS is automatically publishing the site. How can I use it for auto publishing of sites... as Should we refer our IIS website to this directory. What is the purpose of it?

preguntado el 01 de febrero de 12 a las 14:02

1 Respuestas

Firstly, the working directory is as the name says, a "working" directory. That is where the build agent downloads the source, perform compiles etc. It also clears the working directory whenever you run the build again so you risk grabbing unfinished artifacts when you try to retrieve from the working directory.

TFS defines a "drop folder" that it will copy the final artifacts to, once the build completes. You can define the drop folder for a build by editing it's build definition:

  1. Right click on the build and choose 'edit build definition.
  2. Select the 'Build Defaults' section.
  3. Tick 'This build copies output files to a drop folder'
  4. Enter an UNC path for the build agent to copy artifacts to (make sure the Build Agent has access to that UNC path!)

Secondly, in regard to _PublishedWebsites. The build agent will create a _PublishedWebsites folder for each Web project it builds as part of its build artifacts (so if you tell it to build a solution with 2 web projects, it'll create [Project name A]\_PublishedWebsites and [Project Name B]\_PublishedWebsites). Inside each _PublishedWebsites folder are the contents to be dropped into an IIS application, same as what you would get by right clicking on a web project and selecting 'Publish'. I normally add a last step in the build workflow to copy the contents of this _PublishedWebsites folder to my desired IIS directory.

This link tells you how to add the copy workflow: TFS 2010: Copie _PublishedWebsites al servidor de prueba

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

contestado el 23 de mayo de 17 a las 13:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.