Assembly (dll) related questions

Posted by oedev on 28-Feb-2014 01:53

Hi 

I'm trying to get OE 10.2B to recognise an assembly, but not with much luck. I am working with a number of dll's from a particular company, which all work fine. However, one particular assembly will just not be recognised by OE.

1. I normally add my assemblies to the GAC using gacutil. When I try to add this assembly to the GAC, I get the error;

Failure adding assembly to the cache: Attempt to install an assembly without a strong name

which I believe is related to the fact that the assembly is not signed ? 

2. If I copy the assembly into my project folder, and add it to my projects assembly references, then this works. However, none of the available classes in the assembly are exposed. In the class browser, the assembly has a red cross against it, and the following text is displayed;

Assembly Accusoft.Forms1

Location: Accusoft.Forms1, Version=1.0.2.30, Culture=neutral, PublicKeyToken=null

Note:
This assembly is not available to the Class Browser.
The assembly could not be loaded from the global assembly cache or from the assembly directory of the project.

Again, Is this because it is not signed, indicated by the publickeytoken=null ?

3. The suppliers of the assembly actually provide the code as well. I have looked at the build parameters for the assembly, and noticed the "Register for COM Interop" option is not set - is that significant ? 

 

Any advice/help will be much appreciated!

All Replies

Posted by Chris S. Hogan on 28-Feb-2014 08:50
If this is an old COM .dll and not a .NET assembly you might try regsvr32 to register the .dll manually and have its classes available.
 
 
 
[collapse]
From: oedev [mailto:bounce-oedev@progress.com]
Sent: Friday, February 28, 2014 2:54 AM
To: TU.OE.Development@community.progress.com
Subject: Assembly (dll) related questions
 
Thread created by oedev

Hi 

I'm trying to get OE 10.2B to recognise an assembly, but not with much luck. I am working with a number of dll's from a particular company, which all work fine. However, one particular assembly will just not be recognised by OE.

1. I normally add my assemblies to the GAC using gacutil. When I try to add this assembly to the GAC, I get the error;

Failure adding assembly to the cache: Attempt to install an assembly without a strong name

which I believe is related to the fact that the assembly is not signed ? 

2. If I copy the assembly into my project folder, and add it to my projects assembly references, then this works. However, none of the available classes in the assembly are exposed. In the class browser, the assembly has a red cross against it, and the following text is displayed;

Assembly Accusoft.Forms1

Location: Accusoft.Forms1, Version=1.0.2.30, Culture=neutral, PublicKeyToken=null

Note:
This assembly is not available to the Class Browser.
The assembly could not be loaded from the global assembly cache or from the assembly directory of the project.

Again, Is this because it is not signed, indicated by the publickeytoken=null ?

3. The suppliers of the assembly actually provide the code as well. I have looked at the build parameters for the assembly, and noticed the "Register for COM Interop" option is not set - is that significant ? 

 

Any advice/help will be much appreciated!

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
Posted by Mike Fechner on 28-Feb-2014 08:54

The Accusoft.Forms1 Assembly seems to be .NET 4.0 (help.accusoft.com/.../webframe.html)

OpenEdge 10.2B does not support .NET 4.0, that framework version is used from OpenEdge 11 on.

Quote from the docu website:

Using the Forms API outside of .NET 4 and Visual Studio 2010

In order to use the Forms API in projects that target earlier version of .NET, such as .NET 2, 3, or 3.5, the Forms API needs to be rebuilt from source code. This is also the case if you want to use a prior version of Visual Studio.

To build the Forms API to target an earlier version of .NET, a Visual Studio 2008 project file is installed with the FormSuite SDK.

So you need to migrate to OpenEdge 11, or rebuild the Assembly using .NET 2.0 (that's a simple project setting in Visual Studio, just in case the source does not use any features that are unavailable on .NET 2.0).

Don't know which is easier in your situation.

Posted by Jean Richert on 28-Feb-2014 08:55

If this is an old COM .dll and not a .NET assembly you might try regsvr32 to register the .dll manually and have its classes available.

Details here: support.microsoft.com/.../249873

Posted by oedev on 03-Mar-2014 01:16

Thanks for the replies guys.

Mike, thanks for pointing me in the right direction. Re-built the dll using VS Express 2013, using .NET 3.5 and the assembly is now recognised correctly by OE.

This thread is closed