简体   繁体   中英

SSIS package with Script task does not work when deployed programmatically

I am running into the weird issue that the script component of an SSIS package deployed as part of an ISPAC file fails if the project deployment is done in an automated fashion - from C# or using PowerShell, that is. Deploying the exact same project using the Integration Services Deployment Wizzard in Visual Studio does not raise any erros when executing the package on the server.

However, I am getting various errors about things missing in the system namespace when executing the package that has been deployed with C# (using Microsoft.SqlServer.Management.IntegrationServices ) such as:

DFT Load STG_ETL_TEST_STAGING_CDC:Error: CS0234 - The type or namespace name 'ComponentModel' does not exist in the namespace 'System' (are you missing an assembly reference?), Properties\\Resources.Designer.cs, 59, 25

DFT Load STG_ETL_TEST_STAGING_CDC:Error: CS0234 - The type or namespace name 'CodeDom' does not exist in the namespace 'System' (are you missing an assembly reference?), Properties\\Resources.Designer.cs, 25, 21

I exported the deployed packages and compared their file sizes. I noticed that the ISPAC of the manually deployed project is slightly bigger than the one deployed programmatically. What is the Deployment Wizzard doing to the project that isn't happening during automated deployment?

To exclude that it has something to do with my C# code, I also tried the following PowerShell script from the Microsoft docs . However, it does use the same assembly as I use in my code ( Microsoft.SqlServer.Management.IntegrationServices ) and the deployed package has the same issues.

I should have mentioned that the project was generated with Biml. Turned out the issue was not related to the binaries but the ISPAC file created by the Biml compiler. Building the project again with VS (using devenv.com theproject.dtproj -build ) solved the issue for me and allowed for programmatic deployment of the project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM