Skip to content

Instantly share code, notes, and snippets.

@DamolAAkinleye
Forked from kulmam92/SSIS.MSBuild.proj
Created February 5, 2017 11:43
Show Gist options
  • Save DamolAAkinleye/b3f5e383d2ee339476ea83cc3f6fc055 to your computer and use it in GitHub Desktop.
Save DamolAAkinleye/b3f5e383d2ee339476ea83cc3f6fc055 to your computer and use it in GitHub Desktop.
MSBuild build script to build SSIS project using Microsoft.SqlServer.IntegrationServices.Build.dll I copied this from the below link and modified a little bit to make it work in my environment. msbuild script for building and deploying a SSIS .ispac file(http://pastebin.com/kbj8tRUz)
<?xml version="1.0" encoding="Windows-1252"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="SSISBuild;SSISDeploy">
<!--Requires a property called $(SSISProj) to be defined when this script is 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) for 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) to folder: $(PROJECTNAME)**************" />
<PropertyGroup>
<ISPac>.\$(SSISProj)\bin\$(CONFIGURATION)\$(SSISProj).ispac</ISPac>
</PropertyGroup>
<DeployProjectToCatalogTask DeploymentFile="$(ISPac)" Instance="$(SSISServer)" Folder="$(PROJECTNAME)" CreateFolder="true" />
</Target>
<Import Project="C:\MSBuild\.nuget\DeployNugetForDB.targets" />
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment