Tutorial :WPF, can´t load a COM dll in some client machines



Question:

I have an WPF Full Tust explorer application that uses a COM assembly.

In some computers it works fine, in other ones it fails. There are too kind ok exceptions I got: ComException and FileNotFoundException. In the first case the dll arrives to clinet but the COm generator isn´t found (wich is the Com generator?? must i add it to the project???), in the second case de dll never goes to client.

It´s an assembly to create and modificate PDF. PdfToolkit

I´ve tried registering the dll progamatically. It registers sucessfully in client, but can´t be load.

Some help, please???? Have I to do something to use the COM assembly in my WPF appplication???


Solution:1

It could be possible you are compiling for "Any CPU", then running your application on an x64 version of windows. When you run your application on x64 and it tries to load the COM, it will not find it because Windows is looking for a 64bit version of the COM.

Try compiling your main executable as "x86" instead of "Any CPU" and it should work on x64 or x86 (if this is the issue).


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »