Huge problem with References DLL's. Please Help

  • Thread starter Thread starter joaotsetsemoita
  • Start date Start date
J

joaotsetsemoita

Hello Everyone. I wil ltry to explain my problem as more detailed as
possible.

Part 1: I created a DLL in vb.net wich works fine when referenced it
in any other vb application. (lets call this DLL 'My DLL'). This My
DLL it references another DLL that is a COM+ DLL. (lets call it DLL
COM). Once again, everything works fine when used in a windows
application.

Part 2: Now Im trying to use My DLL in a ASP.NET project. So I create
a new web project, go to My Project and I add the reference directly
to My DLL. But because My DLL also uses the DLL COM, I add a reference
to the DLL Com as well to my web project.

On the onLoad of my default.aspx page, the only code I have is:

Dim objSMS As New SMSsender.SMSsender (wich is a method of My DLL)
objSMS.CustomerID = 22
objSMS.sendSMS("35312312313", "Recipients Name", 17, "test 123")

This sendSMS method, is where is being used the functions of the COM
DLL and I it comes up with this error:

"Could not load file or assembly 'Interop.SMS_COMAPILib,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=95a7c9d103faea6b' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040) "

I've been looking the web for this error, but all the articles I read,
doesn't look to match my scenario and also, a couple of things are
mentioned that goes beyond my .NET knowledge (I'm kinda new on
this .net and DLL's, I used to be a Classic ASP programmer)

Any help will be much apprecianted. Thanks in advance for taking your
time to read this wall of text.

Joao
 
Hi,

Try to add required COM library in references. In Add Reference window you
should see list of regestered COM libraries. After you added it, Interop
library will be created - it's .net wrapers for COM.

Good luck,
Ilya Albrekht
 
Hi, thanks for you reply.

I tried that already, still no luck. Same problem, same error.
Anything else I could try?
 
If you're getting a COMException with this, then you need to make sure thatthe SMS_COMAPILib.dll is being referenced correctly i.e. it's either in your project bin folder or in the Windows/System32 or SysWOW64 if 64bit.

The other thing is make sure that your project target platform aligns with your dlls for compatibility otherwise you will get exceptions i.e. if your dll is 32 bit make sure that your project target platform is x86.
 
Back
Top