Once you have finished your BIML script (using BIDS SQL Server 2008) to create the SSIS package you simply right click the BIML file and click Generate SSIS packages.
How do i generate the SSIS packges via code e.g. C# or SQL? I can imagine some kinda of shell script to the BimlEngine.dll e.g. BimlEngine.dll -"myFileServer\myBimlScript", "generate SSIS packages"
I have found this c# code project
https://github.com/jgsato/BimlGen
and in particular this file
https://github.com/jgsato/BimlGen/blob/master/BimlGenerator.cs
i'm just not sure how to use it.
Thanks for your help.
The code you linked is a mechanism for generating Biml, xml, based on SMO.
Your intention is to reproduce the right click/generate SSIS package, thus converting the Biml XML into a DTSX's XML. To do this, you'll need to look at how BidsHelper does it. In the class BimlExpandPlugin, you'll find version specific calls to the BidsHelper.CompileBiml
ValidationReporter validationReporter = BidsHelper.CompileBiml(
typeof(AstNode).Assembly,
"Varigence.Hadron.BidsHelperPhaseWorkflows.xml",
"Compile", bimlScriptPaths,
new List<string>(),
tempTargetDirectory,
projectDirectory,
SqlServerVersion.SqlServer2008,
SsisVersion.Ssis2012,
SsasVersion.Ssas2008,
DeployPackagesPlugin.IsLegacyDeploymentMode(project) ?
SsisDeploymentModel.Package :
SsisDeploymentModel.Project);
Something to note is that the folks at Varigence provide the functionality that exists for BidsHelper as a subset of what their product, Mist, is capable of. One of those things is skipping the XML mashing and just use native .NET objects to create and describe SSIS objects. If you want to work with the .NET objects, then you'll need to buy a license.
I don't think this will work. I tried it, but as you can see in the below SO thread, it didn't work.
Expand BIML files programmatically