ssisvisual-studio-2015bimlssis-projects

BIML to create multiple projects in a single solution


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):

TwoProjects

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?


Solution

  • 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

    enter image description here

    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

    enter image description here

    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.

    enter image description here

    Build will then create a Solution and project but it you'd have to manually add the project from one to the other.