Highlighted
Absent Member.
Absent Member.
762 views

Using .NET Assembly of a custom library (with NETDEFGEN)

[Migrated content. Thread originally posted on 25 February 2011]

Hi, i have a custom library in C# .NET compiled in a dll. In NetDefGen (with runtime 9) i select my dll from my path using "Other location" option. When i click on "next", the tab that should list all classes of my library is blank. All my classes are declared public, as well as all their methods i want to expose; do i need to compile the library with particular options in order to use it from COBOL?
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: Using .NET Assembly of a custom library (with NETDEFGEN)

There is no need for special build. This sounds like a bug, I suggest you report to Technical support.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Using .NET Assembly of a custom library (with NETDEFGEN)

Finally i found the problem. The .NET project must be compiled with 2.0 compatibility. If someone want to use features of newer versione of the framework, see here.

In order to have 2.0 -> 3.5 reference, unload the referencing project, right-click on the unloaded project, select Edit from context menu, and add SpecificVersion = true metadata to the reference. However, you may still see warnings that there is a P2P reference to a 3.0 project.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.