teamcity - How can I avoid this deep folder structure with MSDeploy to filesystem using MSBuild? -


i'm pulling hair out on msbuild issue.

we're using teamcity build solution 2 mvc websites in it. part of build we're deploying folder on build server. iis points folder give integration build visible management.

here's code msbuild file uses msdeploy publish package - not zip file.

<target name="deploy">   <msbuild      projects="$(solutionfile)"     properties="platform=$(platform);configuration=$(configuration);     deployonbuild=true;     deploytarget=package;     packagelocation=$(packagelocation);     packageassinglefile=false;     autoparameterizationwebconfigconnectionstrings=false" /> </target> 

the problem here incredibly deep folder structure. here's example...

c:\deploy\archive\content\c_c\users\edmond\documents\visual studio 2008\creatiogreen\creatio\code\core\trunk\website\website\obj\release\package\packagetmp[published files]

i want deploy predictable folders like...

c:\build\website[published files] c:\build\mobilewebsite[published files]

that's background. here specific questions.

  1. are making mistake trying use msdeploy publish local filesystem? need equivalent of vs2010 "publish" feature, config transforms. we're not trying deploy remote iis instances or anything.

  2. is there way of doing specifying publish folders?

  3. i've been trying use msbuild copy task copy files more sensible folders - can't work out how use wildcards specify folders need take - need like...

c:\folderpackageendsupin[anyfolders]\website[anyfolders]\packagetmp**.

help!

you can use webdeploy directly more tuned outcome. example can use following command sync 2 folders directly root-to-root:

>"%programfiles%\iis\microsoft web deploy\msdeploy.exe" -verb:sync -source:dirpath=<sourcefolder> -dest:dirpath=<destinationfolder>

or can make webdeploy include iis configuration on destination using iisapp provider instead of dirpath:

>"%programfiles%\iis\microsoft web deploy\msdeploy.exe" -verb:sync -source:iisapp=<sourcefolderoriispath> -dest:iisapp=<destinationfolderoriispath>

for example, sync simple folder new app "newapp" under default web site, call way:

>"%programfiles%\iis\microsoft web deploy\msdeploy.exe" -verb:sync -source:iisapp="d:\mywebsite" -dest:iisapp="default web site/newapp"

then, can have batch file perform sync/packaging calling webdeploy directly , execute post-build event.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -