Can you use BIML to create multiple projects within a single solution?
The following creates a single project with two packages within it, but I'm trying to create two separate projects with a package in each:
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Projects>
<PackageProject Name="ProjectOne" ProtectionLevel="EncryptSensitiveWithUserKey">
<Packages>
<Package PackageName="PackageProjectOne" />
</Packages>
</PackageProject>
<PackageProject Name="ProjectTwo" ProtectionLevel="EncryptSensitiveWithUserKey">
<Packages>
<Package PackageName="PackageProjectTwo" />
</Packages>
</PackageProject>
</Projects>
<Packages>
<Package Name="PackageProjectOne" Language="None" ProtectionLevel="EncryptSensitiveWithUserKey" />
<Package Name="PackageProjectTwo" Language="None" ProtectionLevel="EncryptSensitiveWithUserKey" />
</Packages>
</Biml>
What I'm trying to achieve (two distinct projects, with a package in each):
Presumably because the BIML files reside within each project, you would need to start with two projects, then build the BIML from each project - is that right?
What if I wanted to use a single solution to build only one project, or two / three?
Correct, the Biml file drives the current project, in a Visual Studio context at least. Crossing projects doesn't "really" work like you're hoping.
This is the result of running the supplied Biml in Visual Studio via BimlExpress
And that makes sense, to me at least. There are a few restrictions in the BimlExpress product, one is that it doesn't emit project parameters and it seems it also ignores the Project setting in general
What if we step up to the paid for solution, BimlStudio? Here I have the same BimlFile1.biml
After executing the script, it generates the 4 artifacts under the Integration Services node: 2 projects, 2 files. The next step is to Build to a project and that's where what you're looking for falls down. You can only build one project at a time. You can multiselect projects but it only builds the last one selected.
Build will then create a Solution and project but it you'd have to manually add the project from one to the other.