SSIS Error : Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase

Problem :

 
I'm upgrading SSIS 2005 packages to SQL 2008 R2, and I'm running into a problem with VB.Net the Scripting Task.  In SQL 2005 SSIS VB.Net Scripting task the DTS object is instantiated implicitly at runtime and has global scope.  In SSIS 2008 VB.Net scripting task you need to add the reference:
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
Unfortunately this creates an error message that I don't understand:
'ScriptMain' is not CLS-compliant because it derives from 'VSTARTScriptObjectModelBase', which is not CLS-compliant. The module won't build the binary with this error. 


Solution :

Please refer to the following code in this case:

<System.AddIn.AddIn("ScriptMain", Version:="1.0", Publisher:="", Description:="")> _<System.CLSCompliantAttribute(False)> _
Partial Public Class ScriptMain
Inherits Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase


For detail information, please take a look at the following example:
http://microsoft-ssis.blogspot.com/2011/03/get-file-properties-with-ssis.html

Comments

Popular posts from this blog

SSAS : A connection cannot be made to redirector. Ensure that 'SQL Browser' service is running. (Microsoft.AnalysisServices.AdomdClient). + Solution

SSIS Error : Unable to infer the XSD from the XML file. The XML contains multiple namespaces