.net - loading C++/CLI assembly from c# -
i'm writing c++/cli rcw around set of proprietary com-objects use c#-application, when deploy rcw , c#-application filenotfound error.
after did simplest thing possible:
a .net class library written c++/cli (vs2012), no code added default implementation.
a c# windows forms application, solution , project set target x86. reference added c++/cli class library button form in c# appilcation , crete instance of class1 c++/cli library.
the error still same; in detail:
see end of message details on invoking just-in-time (jit) debugging instead of dialog box. ************** exception text ************** system.io.filenotfoundexception: not load file or assembly 'classlibrarytest.dll' or 1 of dependencies. specified module not found. file name: 'classlibrarytest.dll' @ system.reflection.runtimeassembly._nload(assemblyname filename, string codebase, evidence assemblysecurity, runtimeassembly locationhint, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) @ system.reflection.runtimeassembly.nload(assemblyname filename, string codebase, evidence assemblysecurity, runtimeassembly locationhint, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) @ system.reflection.runtimeassembly.internalloadassemblyname(assemblyname assemblyref, evidence assemblysecurity, runtimeassembly reqassembly, stackcrawlmark& stackmark, intptr pprivhostbinder, boolean throwonfilenotfound, boolean forintrospection, boolean suppresssecuritychecks) @ system.reflection.runtimeassembly.internalloadfrom(string assemblyfile, evidence securityevidence, byte[] hashvalue, assemblyhashalgorithm hashalgorithm, boolean forintrospection, boolean suppresssecuritychecks, stackcrawlmark& stackmark) @ system.reflection.assembly.loadfrom(string assemblyfile) @ windowsformsapplicationtest.form1.button1_click(object sender, eventargs e) in c:\users\sten\documents\visual studio 2012\projects\c#\windowsformsapplicationtest\windowsformsapplicationtest\form1.cs:line 23 @ system.windows.forms.control.onclick(eventargs e) @ system.windows.forms.button.onclick(eventargs e) @ system.windows.forms.button.onmouseup(mouseeventargs mevent) @ system.windows.forms.control.wmmouseup(message& m, mousebuttons button, int32 clicks) @ system.windows.forms.control.wndproc(message& m) @ system.windows.forms.buttonbase.wndproc(message& m) @ system.windows.forms.button.wndproc(message& m) @ system.windows.forms.control.controlnativewindow.onmessage(message& m) @ system.windows.forms.control.controlnativewindow.wndproc(message& m) @ system.windows.forms.nativewindow.callback(intptr hwnd, int32 msg, intptr wparam, intptr lparam) ************** loaded assemblies ************** mscorlib assembly version: 4.0.0.0 win32 version: 4.0.30319.34209 built by: fx452rtmgdr codebase: file:///c:/windows/microsoft.net/framework/v4.0.30319/mscorlib.dll ---------------------------------------- windowsformsapplicationtest assembly version: 1.0.0.0 win32 version: 1.0.0.0 codebase: file:///c:/smoketest/windowsformsapplicationtest.exe ---------------------------------------- system.windows.forms assembly version: 4.0.0.0 win32 version: 4.0.30319.34209 built by: fx452rtmgdr codebase: file:///c:/windows/microsoft.net/assembly/gac_msil/system.windows.forms/v4.0_4.0.0.0__b77a5c561934e089/system.windows.forms.dll ---------------------------------------- system.drawing assembly version: 4.0.0.0 win32 version: 4.0.30319.34209 built by: fx452rtmgdr codebase: file:///c:/windows/microsoft.net/assembly/gac_msil/system.drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/system.drawing.dll ---------------------------------------- system assembly version: 4.0.0.0 win32 version: 4.0.30319.34238 built by: fx452rtmgdr codebase: file:///c:/windows/microsoft.net/assembly/gac_msil/system/v4.0_4.0.0.0__b77a5c561934e089/system.dll ---------------------------------------- ************** jit debugging ************** enable just-in-time (jit) debugging, .config file application or computer (machine.config) must have jitdebugging value set in system.windows.forms section. application must compiled debugging enabled. example: <configuration> <system.windows.forms jitdebugging="true" /> </configuration> when jit debugging enabled, unhandled exception sent jit debugger registered on computer rather handled dialog box.
i have used fusion log viewer try find error, according log classlibrarytest.dll loaded successfully.
what missing here?
Comments
Post a Comment