BIML - Visual Studio crashes regenerating packages with sequence containers

Topics: Standing Discussions
Aug 11, 2014 at 1:24 PM
Hello,

When using biml with sequence containers, my Visual Studio crashes whenever I generate a package that then must reload the already opened DTSX file. The issue seems to only happen when using biml to generate a package that contains at least one sequence container. I have BIDS Helper Version 1.6.6.0, running on Visual Studio 2012 Shell.

I can reproduce this issue with the following code:
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
    <Packages>
        <Package Name="Test" ConstraintMode="Parallel" ProtectionLevel="EncryptSensitiveWithUserKey">
            <Tasks>
                <Container Name="SEQ 1" ConstraintMode="Parallel" />
            </Tasks>
        </Package>
    </Packages>
</Biml>
The first time I run this, it works as expected and creates the Test.dtsx package. I open the Test.dtsx package and there is a sequence container. If I then "Generate SSIS Package" while the package is already open, select to overwrite/reload the file, I receive the following error multiple times (seems like 4 times per sequence container). Everything was generated correctly, but the error box still shows. However, if I close the package in Visual Studio, then generate and manually open, there is no issue.
TITLE: Microsoft Visual Studio
------------------------------
Exception has been thrown by the target of an invocation.
------------------------------
ADDITIONAL INFORMATION:
Object reference not set to an instance of an object. (Microsoft.SqlServer.Graph)
------------------------------
BUTTONS:
OK
------------------------------
Is anyone else seeing this behavior and if so, is there a fix?
Coordinator
Aug 13, 2014 at 2:32 AM
I would suggest that the short term work around would be to close the package before regenerating it. I suspect that VS is re-reading the file as BIML engine is in the process of re-writing it. I'm not sure if there will be an easy fix for this or whether we might just look at popping up a warning when you have dtsx files open when generating a BIML file.
Coordinator
Mar 18, 2015 at 12:23 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jul 21, 2015 at 3:45 PM
I and a colleague are also seeing this class of error error. BIDSHelper 1.7/VS2010 shell/SQL 2012. Closing before regenerating is a good workaround. Continued on the work item.