Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing Drop Folder Structure with TFS Team Build

I'm using TFS 2012 to automate a build of a solution which contains multiple windows services and two web applicaitons.

I've used the guide I found here to customize the build process template so that the windows services are put in a folder structure that I like. Specifically:

  1. \dropserver\droproot\MyApp\BuildNumber\
    • \Service1
    • \Service2
    • \Service3
    • \Service4

This works great, but unfortunately it doesn't work for web applicaitons. If I used the same strategy for those, I just get the contents of /bin for each web app, rather than the full site contents.

MSBuild typically uses the web application targets to handle this, but for some reason, this doesn't work when you customize the build as I have. I no longer get the _PublishedWebSites folder in the build output. (I'm guessing that's because I cleared our the OutDir property of the MSBuild task.)

Has anybody done something like this and gotten it to work with web applications as well?

like image 516
RMD Avatar asked Nov 04 '22 04:11

RMD


1 Answers

I think I can help with this, it looks like in the build targets that the published websites folder isn't created if the OutDir is the same as the OutputPath.

So this isn't perfect, but if you add the following into the csproj file in the first property group, you'll get everything deployed into "\bin\deploy\" including the _PublishedWebsites folder

<DeployOnBuild>True</DeployOnBuild>
<OutDir>bin\deploy\</OutDir>
like image 143
Matt Whetton Avatar answered Nov 16 '22 10:11

Matt Whetton