Could not load file or assembly 'MicroFocus.COBOL.Runtime'

[Migrated content. Thread originally posted on 24 May 2012]


I am trying to play with NetExpress 5.1 with C#.
I installed NetExpress 5.1 (evalutaion) after VS 2008 Shell Redistribution.
The MF packages are in
C:\Program Files\Micro Focus\Net Express 5.1\PACKAGES\PublicAssemblies

I try some example found in CobolanddotNetprojects from MF resources.

I can compile the code without error but when I try to run a program (circleUI for example), receive an error message : Could not load file or assembly 'MicroFocus.COBOL.Runtime'.

I declare the resources in the C# project, the cobol dll is also there.

Do you have any idea why I have this error ?

I thank you.


  • Verified Answer

    These samples are from the Will Price book and were created using Net Express 4.0.

    I just downloaded them here from the Supportline web page and opened up Solution0502, which uses the CircleUI_c project, using Net Express 5.1 with wrappack 6 installed and it converted the solution when I first opened it, but I was able to compile and run without error.

    The MicroFocus.COBOL.Runtime that appears as a reference in the project is the one in the 5.1\packages\PublicAssemblies folder so it is the correct version.

    Does this error occur for you on this solution?

    What wrappack of Net Express do you have installed?
    I am also using Visual Studio 2008 Professsional and you are using the shell so that may be a difference also.

    There are a number of example programs that are distributed with the product that are in the C:\Program Files\Micro Focus\Net Express 5.1\Examples\Visual Studio Integration folder.

    Do you have the same problem with these examples?

    If you are new to COBOL .NET, I would highly recommend that you take a look at our latest product offering which is Visual COBOL for Visual Studio. It integrates into Visual Studio 2010 and supports all current .NET Framework releases as well.