デバッグを開始しようとすると、これらの警告が表示されます。私はdtsxを実行するWindowsフォームアプリケーションを構築しました。Microsoft.SqlServer.ManagedDTSを次のように追加すると、Visual Studio 2015で警告が表示されます。アプリケーションとは異なるプロセッサをターゲットにします。
私はローカルマシンにdtsxを実行すると、結果はSUCCESSですが、私は、Windowsフォームアプリケーションを実行すると、結果は失敗です。
私のシステムでは、次のとおりです。
- プロセッサ:インテルCore IM CPUの@の2.50Ghz
- メモリ:8ギガバイト
- OS:Windowsの10のx64
私は修正するための多くの方法を試してみましたそれ:
異なるバージョンを追加する参照セクションのMicrosoft.SqlServer.ManagedDTSのnsを参照してください。
起動useLegacyV2RuntimeActivationPolicy = "true" を2014クライアントツールSDKの機能を追加し、再インストールSQL:
はApp.configファイルに行を追加します。任意のCPU、x86およびx64運のないいずれかを:
は、プラットフォームターゲット
のVisual Studioに多くの機能を追加します。 Visual Studioの2013プレミアム
警告 - https://msdn.microsoft.com/en-us/library/ms136090.aspx
SSIS:
Severity Code Description Line Suppression State
Warning Referenced assembly 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.SqlServer.Msxml6_interop\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Msxml6_interop.dll' targets a different processor than the application. C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 3505
Warning Referenced assembly '\\tsclient\C\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSRuntimeWrap.dll' targets a different processor than the application. C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 3505
Warning Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 1819
私は多くの研究をやったよう
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.SqlServer.Dts.Runtime;
namespace alerts_operations
{
public partial class frmSSIS : Form
{
public frmSSIS()
{
InitializeComponent();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void btnFTP_Click(object sender, EventArgs e)
{
Microsoft.SqlServer.Dts.Runtime.Application myApplication = new Microsoft.SqlServer.Dts.Runtime.Application();
//Package myPackage = myApplication.LoadPackage(@"C:\ftp_extract.dtsx", null);
Microsoft.SqlServer.Dts.Runtime.Package myPackage = myApplication.LoadPackage(@"V:\ftp_extract.dtsx",null);
lblStatus.Text = "Executing package...";
Microsoft.SqlServer.Dts.Runtime.DTSExecResult myResult = myPackage.Execute();
// Show the execution result
lblStatus.Text = "Package result: " + myResult.ToString();
}
}
}
ビルドログ:
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'Z:\ACOLON\Projects\operations\operations\bin\Debug\operations.vshost.exe'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Net.Http.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x2348 has exited with code 0 (0x0).
The thread 0x1c24 has exited with code 0 (0x0).
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'Z:\ACOLON\Projects\operations\operations\bin\Debug\operations.exe'. Symbols loaded.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ManagedDTS.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.SqlServer.DTSRuntimeWrap\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.DTSRuntimeWrap.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.SqlServer.Diagnostics.STrace\12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Diagnostics.STrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.ScriptTask\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ScriptTask.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.VSTAScriptingLib\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.VSTAScriptingLib.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.SqlServer.Msxml6_interop\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Msxml6_interop.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.DtsMsg\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.DtsMsg.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.ExecProcTask\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.ExecProcTask.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\Microsoft.SqlServer.SQLTask\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.SQLTask.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'ST_9d880699f696403b9ab1169dab706d45'. Module was built without symbols.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Diagnostics\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Diagnostics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration.Install\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.Install.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.ConsoleHost\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.ConsoleHost.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Utility\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Utility.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Commands.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Commands.Management.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Management.Infrastructure\v4.0_1.0.0.0__31bf3856ad364e35\Microsoft.Management.Infrastructure.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.PowerShell.Security\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.PowerShell.Security.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.WSMan.Management\v4.0_3.0.0.0__31bf3856ad364e35\Microsoft.WSMan.Management.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'Anonymously Hosted DynamicMethods Assembly'.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Management\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Management.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Diagnostics.Tracing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Diagnostics.Tracing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0x7e0 has exited with code 0 (0x0).
'operations.vshost.exe' (CLR v4.0.30319: operations.vshost.exe): Loaded 'ST_c01711d8321445bcbe1c4f5abc4dee25'. Module was built without symbols.
The thread 0x246c has exited with code 0 (0x0).
The thread 0x54 has exited with code 0 (0x0).
The thread 0x1df0 has exited with code 0 (0x0).
The program '[7748] operations.vshost.exe' has exited with code 0 (0x0).
この問題を解決するために、任意の他の代替、オプションや提案?
私はそれを削除しましたが、同じ問題です。 – ALCO135