Skip to main content

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

  • February 25, 2011
  • 4 replies
  • 0 views

[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?

4 replies

[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?
There is no need for special build. This sounds like a bug, I suggest you report to Technical support.

[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?
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.

[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?
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.

[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?
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.