Install TFS 2010 Build server in one folder and overwrite

I've been looking for centuries, and I'm so annoyed because what I want to do is theoretically so simple!

I have a web project, and when I say that my TFS queues a new assembly, I want my published files (or non-published files - I don't care) get to a static folder such as "C: Inetpub \ MYPROJ \ webfiles ".

I checked this TFS 2010 Build Publish post through the file system that led me to this Team Build post : Publish locally using MSDeploy , but I just don't understand and it seems to not work.

I have all the settings for the assembly, and it is successfully built and will even be built into the folder that I am specifying, but as soon as she builds it, it ends up loading the subfolders - one of which has an added version number, meaning IIS will not automatically pick up my last version without any reconfiguration. (I removed the version bindings, but then it will not overwrite the last build with the last build)

I am currently fighting these MSBuild arguments to try to get it to work:

/p:DeployOnBuild=true; DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder; _PackageTempDir="\\HomeServer\inetpub\SiteTest"; AutoParameterizationWebConfigConnectionStrings=false 

But there are a few points:

  • The SiteTest folder is never created and
  • It is accessed through the shared folder when it is intended for the local HomeServer file system, which I also want to publish.

I just need to automatically get my web files inside a folder that I can predefine for IIS, please help!

+4
source share
1 answer

I achieved this by customizing our build process template. Make a copy of your DefaultTemplate.xaml (e.g. DefaultTemplateV2.xaml) and open it.

If you are new to xaml workflow editor, I find that it helps collapse all over again.

Once it opens, click the root sequence and click "Arguments". Add three arguments:

  • DeployBuild (Boolean) Default False
  • FromPath (String)
  • InstallPath (String)

Then, in your workflow, open the following sections:

  • Run agent
  • Try compiling, testing and ...
  • In the section "Try to open the sequence"

At the bottom of the sequence after receiving the trial, open the toolbar and drag the β€œIf” work item. Set the condition to DeployBuild.

In the After section, drag and drop in the CopyDirectory workflow item. Set Destination for InstallPath and Source for

 String.Format("{0}\{1}", BinariesDirectory, FromPath). 

Save it and check it. You will need to open the previous assembly and mark the built-in assembly folder that you want to deploy. It will be something like _PublishedWebsites \ mywebsite \

Change the assembly definition (you may have to close and reopen VS) and go to the Process tab. Change the build process template to the new version.

Set the FromPath parameter to the path just specified. Install InstallPath in the UNC path to the target folder (you need to make sure that any service account that runs your builds has access to this path) and set DeployBuild to True.

Save, queue the assembly, and test the deployment.

You can also jump to arguments in your XAML workflow and edit the metadata argument with each of your new arguments. You can set where they can be viewed. Thus, you can, for example, install FromPath and InstallPath for viewing only when editing the definition, but DeployBuild will be displayed when the build is in order. This way you can turn it on or off in order of priority.

Good luck.

+1
source

All Articles