Cannot add .net dll

Posted by Jens Dahlin on 21-Dec-2012 01:42

Trying to add a .net dll in Developer Studio 11.1. I've tried:

* Project properties -> Assemblies -> Add

* Class Browser -> Add External Resources

I've tried putting the dll in both the project directory and system32. Whatever I do I get:

"The following library could not be loaded".

I've rightclicked the file and "Unblocked" it (as seen in another post here on PSDN).

The library should be (according to its documenation) .net 3.5 compatible and it's non gui.

Any ideas?

All Replies

Posted by Admin on 21-Dec-2012 01:45

Are you getting a more meaningful message from

System.Reflection.Assembly:Load ("yourassemblyname"). ?

http://msdn.microsoft.com/en-us/library/x4cw969y.aspx

Posted by Jens Dahlin on 21-Dec-2012 02:36

I'm obviously not that used to working with assemblies!

When trying to create an assembly (Openedge -> Tools -> Assembly References -> New), I go to Local Assemblies and try to add the dll, all I get is a message saying "Not a valid assembly". I'm quite sure I've added this specific dll in OE 10 without this error. Haven't got OE 10 installed anymore though.

Posted by Jens Dahlin on 21-Dec-2012 03:59

Now I found out that I can add an older version of this .dll to my project but not the current one. Support for this third-party dll seems to be closed for Christmas. Perhaps they've changed something, guess I will have to wait until after the holidays.

Posted by nidk on 21-Dec-2012 06:51

I Jens,

  When i have the message , this OE architech try open dll in GAC , now i copy my DLL in assemblie directory of my project : ex: [project name]\Assemblies. And uncheck "Use default directory", and choose my assemblie directory, now when i add dll from this directory , i don't have any message.

Posted by andrew.thornton@redprairie.com on 21-Dec-2012 06:52

I will be out of the office until Wednesday 2nd January with no email access. If you need to contact someone within the office then please phone reception on 01904 727150, otherwise I will reply to your email as soon as I am able.

Thanks, Andrew.

Email Disclaimer

Posted by Jens Dahlin on 09-Jan-2013 06:22

What should I use as a name of the assembly?

If I do System.Reflection.Assembly:Load ("baxi_dotnet.dll") I get an error that looks like it cannot find the file (I get the same if I do :Load("xxxx.dll")).

However if I do System.Reflection.Assembly:Load (search("baxi_dotnet.dll")) I get an error with more information:

(Translated from swedish):

System.IO.FileLoadException: Cannot load file or collection (c:\\Users\\Jens.AIR\\Progress\\Developer Studio 3.6\\workspace\\BaxiIntegration\\baxi_dotnet.dll) or one of its dependencies. Given collection name or -codebase is wrong. Exception from HRESULT 0x80131047.

Any ideas?

Posted by SJProgress on 09-Jan-2013 06:26

Vielen Dank für Ihre Nachricht!

Ich werde ab Fr. 11.01.2013 wieder im Büro sein und Ihre Email-Nachricht bearbeiten.

Mit freundlichen Grüssen

Josef Siegetsleitner, Easyrent Software Entwicklung

Thank you for your message!

I will return to my office on Friday January, 11th and will answer your email then.

Best regards

Josef Siegetsleitner - Easyrent Software Development

Posted by Jens Dahlin on 09-Jan-2013 06:36

Replacing Load (that seems to take an assembly reference and not a file name + path) with LoadFile gives more information:

Same error only it seems to return the assembly reference (baxi_dotnet, Version=, Culture= etc etc) ending with something like "Strong name vaildation failed (Exception from HRESULT 0x8013141A). And then the same thing repeated a second time preceeded by "System.Security.SecurityException."

Googling on...

Posted by Admin on 09-Jan-2013 06:40

Some have reported here (I haven't experienced this myself), that you have to locate the .dll in Windows explorer and choose a "approve" or "grant access" from the context menu. Julian Lyndon-Smith may know the exact wording.

Posted by Jens Dahlin on 09-Jan-2013 07:03

Yes, I've already done that!

I found a solution. The dll was available both as signed and unsigned. For some reason I was told to use the unsigned. Switching to the signed version worked right away!

This thread is closed