Erreur de tâche de script SSIS après la mise à niveau du formulaire de package 2008 à 2012

J'ai un package SSIS qui a été mis à niveau vers SQL Server 2012 et j'obtiens une erreur d'exécution lorsqu'il essaie d'exécuter une tâche de script simple.

L'erreur d'exécution donne très peu d'informations.

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(Ssortingng name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, Ssortingng[] namedParams) at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript() 

Il semble que cela se passe bien quand il essaie d'exécuter le script parce que je place un point d'arrêt à l'endroit où il entre dans main () et il n'y arrive même pas. Presque comme s'il ne pouvait pas find le script compilé ou quelque chose.

Voici le code du script: ce qui est assez simple.

 /* Microsoft SQL Server Integration Services Script Task Write scripts using Microsoft Visual C# 2008. The ScriptMain is the entry point class of the script. */ using System; using System.Data; using Microsoft.SqlServer.Dts.Runtime; using System.Windows.Forms; using System.Xml; using System.Data.SqlClient; using System.Data.OleDb; using System.IO; namespace ST_645b1fbdfe504c9482df626a189b6659.csproj { [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAtsortingbute] public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase { #region VSTA generated code enum ScriptResults { Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success, Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure }; #endregion /* The execution engine calls this method when the task executes. To access the object model, use the Dts property. Connections, variables, events, and logging features are available as members of the Dts property as shown in the following examples. To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value; To post a log entry, call Dts.Log("This is my log text", 999, null); To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true); To use the connections collection use something like the following: ConnectionManager cm = Dts.Connections.Add("OLEDB"); cm.ConnectionSsortingng = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;"; Before returning from this method, set the value of Dts.TaskResult to indicate success or failure. To open Help, press F1. */ public void Main() { WriteError("Error_FactEFCTaps_StageTaps_TripKey"); WriteError("Error_FactEFCTaps_StageTaps_ActionKey"); WriteError("Error_FactEFCTaps_StageTaps_ServiceKey"); WriteError("Error_FactEFCTaps_StageTaps_ZoneKey"); WriteError("Error_FactEFCTaps_StageTaps_YardKey"); WriteError("Error_FactEFCTaps_StageTaps_MTTapDateKey"); WriteError("Error_FactEFCTaps_StageTaps_MTTapTimeKey"); WriteError("Error_FactEFCTaps_StageTaps_StopKeyEndDateNull1"); WriteError("Error_FactEFCTaps_StageTaps_NoPlatformKey2"); WriteError("Error_FactEFCTaps_StageTaps_RouteID0"); WriteError("Error_FactEFCTaps_StageTaps_PlatformKey1"); WriteError("Error_FactEFCTaps_StageTaps_NoPlatformKey3"); WriteError("Error_FactEFCTaps_StageTaps_NoPlatformKey1"); WriteError("Error_FactEFCTaps_StageTaps_NoPlatformKey"); WriteError("Error_FactEFCTaps_StageTaps_InstitutionKey"); WriteError("Error_FactEFCTaps_StageTaps_ProductKey"); WriteError("Error_FactEFCTaps_StageTaps_CardKey"); WriteError("Error_FactEFCTaps_StageTaps_VehicleKeyTraxFR"); Dts.TaskResult = (int)ScriptResults.Success; } public void WriteError(ssortingng variable) { //serialize to xml OleDbDataAdapter da = new OleDbDataAdapter(); DataTable dt = new DataTable(); DataSet ds = new DataSet(); da.Fill(dt, Dts.Variables[variable].Value); ds.Tables.Add(dt); ssortingng xml = ds.GetXml(); if (xml != "<NewDataSet />") { //write to db ssortingng ErrSource = Dts.Variables[variable].Name; ssortingng BatchID = Dts.Variables["BatchID"].Value.ToSsortingng(); SqlConnection cn = new SqlConnection(); cn = (SqlConnection)(Dts.Connections["DW01_ADO"].AcquireConnection(Dts.Transaction) as SqlConnection); SqlCommand cmd = new SqlCommand("insert dbo.EFC_ErrorRows_XML(ErrorSource,RowData,BatchID) values(@ErrorSource, @XML,@BatchID)", cn); cmd.Parameters.Add("@ErrorSource", SqlDbType.VarChar).Value = ErrSource; cmd.Parameters.Add("@XML", SqlDbType.Xml).Value = xml; cmd.Parameters.Add("@BatchID", SqlDbType.Int).Value = BatchID; cmd.ExecuteNonQuery(); } } } } 

J'avais le même problème et je me suis rendu count que SSIS cherchait une DLL que je référençais dans la tâche de script et que je ne la trouvais pas. Pour une raison quelconque, il recherchait uniquement dans le dossier C: \ Program Files (x86) \ Microsoft SQL Server \ 110 \ DTS \ Binn.