c# - Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap -


I have created an SSIS package which will export the data to MSACS. If I try to run the package on its solution project it will execute without error. But when I say package within your program, I get an error

The file could not load assembly Microsoft.SqlServer.DTSRuntimeWrap, Version = 10.0.0.0, Culture = neutral, PublicKeyToken = 89845dcd8080cc91 ' This assembly was compiled for a different processor

Here's my code:.

  Public Zero RunPackage () {textstring ("Launching package ..."); M_worker2.ReportProgress (20); String PkgLocation; Package PKG; Microsoft.SqlServer.Dts.Runtime.Application _app = New Microsoft.SqlServer.Dts.Runtime.Application (); - & gt; I've got an exception. DTSExecResult pkgResult; PkgLocation = Properties.Settings.Default.PackageLoc + "\" Package1.dtsx "; textstring (" Loading package ... "); m_worker2.ReportProgress (30); pkg = _app.LoadPackage (PkgLocation, null); textstring ( "package execute ..."); m_worker2.ReportProgress (30); pkgResult = pkg.Execute (); textstring ( "Ready ..."); m_worker2.ReportProgress (30); textstring (pkgResult.ToString () ); m_worker2 Kriport progress (30);}  

what is there I can tell you the right way. I do not know whether the error occurred. Please reveal to me?

Thanks

Best Regards

its Cite is that you mix x86 and x64 architectures. If your application attempts to compile your application with 86 (= 32-bit) architecture, you can not use 64 (= 64 bit) compiled assemblies. And Any CPU or 64 .

MSDN at:

the goal is to Pl set property (C # )

  1. On the Project menu in the Solution menu, with the project selected in the Project menu, click Properties.

  2. Click the Build tab.

  3. Select a CPU type from the platform target list. The option is any CPU (default), x86, x64, and itanium.

Here's the full link:

Important: if you compile for X64 and use X64 assemblies , Then your application will not run under 32-bit versions of Windows.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -