How to use MSBuild with TFS for SSIS Build -


i want automate ssis build , deployments , create build definition build , deploy ssis project whenever queue up.

i found project: http://sqlsrvintegrationsrv.codeplex.com/releases/view/82369

which allows create dll can place in c:\program files (x86)\microsoft visual studio 10.0\common7\ide\privateassemblies

then can call ssis.msbuild.proj (see end this) parameters in visual studio command line:

msbuild ssis.msbuild.proj /t:ssisbuild,ssisdeploy /p:ssisproj="myssisproject",configuration="dev",,ssisserver="ab-cde-fgh-i1\dev",projectname="myssisproject" 

or can put in bat file this:

%systemroot%\microsoft.net\framework\v4.0.30319\msbuild.exe ssis.msbuild.proj /t:ssisbuild,ssisdeploy /p:ssisproj="myssisproject",configuration="dev",,ssisserver="ab-cde-fgh-i1\dev",projectname="myssisproject" 

it works fine when run bat file, builds , deploys ssis project.

questions:

  1. how can use automated, can manually kick off build , deployment within vs/tfs? using build definition.

  2. how can ensure correct configurations selected, , correct destination server? example have ssis configurations dev, sit, sys, uat, prd. each own server name. need separate build definition each environment or there way use 1 build definition?

  3. anything useful in using powershell somehow?

here ssis.msbuild.proj:

<?xml version="1.0" encoding="windows-1252"?> <project  xmlns="http://schemas.microsoft.com/developer/msbuild/2003"           defaulttargets="ssisbuild;ssisdeploy">   <!--requires property called $(ssisproj) defined when script called-->   <usingtask taskname="deploymentfilecompilertask" assemblyfile="c:\program files (x86)\microsoft visual studio 10.0\common7\ide\privateassemblies\microsoft.sqlserver.integrationservices.build.dll" />   <target name="ssisbuild" condition="'$(ssisproj)' != ''">     <propertygroup>       <ssisprojpath>$(ssisproj)\$(ssisproj).dtproj</ssisprojpath>     </propertygroup>     <message text="**************building ssis project: $(ssisprojpath) configuration: $(configuration)**************" />     <deploymentfilecompilertask       inputproject="$(ssisprojpath)"       configuration="$(configuration)"       protectionlevel="dontsavesensitive">     </deploymentfilecompilertask>   </target>    <usingtask taskname="deployprojecttocatalogtask" assemblyfile="c:\program files (x86)\microsoft visual studio 10.0\common7\ide\privateassemblies\microsoft.sqlserver.integrationservices.build.dll" />   <target name="ssisdeploy" condition="'$(ssisproj)' != ''">     <message text="**************publishing ssis project: $(ssisproj) to: $(ssisserver) folder: $(projectname)**************" />     <propertygroup>       <ispac>$(ssisproj)\bin\$(configuration)\$(ssisproj).ispac</ispac>     </propertygroup>     <deployprojecttocatalogtask           deploymentfile="$(ispac)"           instance="$(ssisserver)"           folder="$(projectname)"           createfolder="true"/>   </target> </project> 

edit tried adding msbuild arguments tfs build definition. tried various combinations of arguments, quotes, without. couldn't work.

"c:\users\me\desktop\buildssis\ssis.msbuild.proj" /t:ssisbuild,ssisdeploy /p:ssisproj="myssisproject",configuration="sit",ssisserver="ab-cde-fgh-i1\dev",projectname="myssisproject" 

but error:

msbuild : error msb1008: 1 project can specified. switch: c:\users\me\desktop\buildssis\ssis.msbuild.proj  switch syntax, type "msbuild /help" 

regarding msbuild error, in process section of build definition:

  • the path proj file goes section "2. build > 1. projects"
  • the msbuild switches go in field named "2. build > 5. advanced > msbuild arguments".

enter image description here


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -