Changes and limitations with .NET on Windows
- Last Updated: July 25, 2024
- 3 minute read
- OpenEdge
- Version 12.8
- Documentation
This topic discusses changes and limitations of using .NET on Windows.
Progress Developer Studio for OpenEdge
.NET support in Progress Developer Studio for OpenEdge is available in the Class Browser and for code completion assistance. .NET support is not currently available for Visual Designer or the Assembly Reference Tools (proasmref and updasmref).
To configure the AVM used by Developer Studio to use .NET, specify the
-clrnetcore startup parameter for building and running ABL
applications.
OpenEdge UltraControls for .NET
OpenEdge ships with an optional set of UI controls licensed from Infragistics. These are separately installable with a license code and branded as "OpenEdge UltraControls for .NET". The existing controls work exclusively with .NET Framework and will not work with .NET. If your application uses these controls and you have your own Infragistics license, you may be able to download the current packages that support .NET Infragistics and use those with OpenEdge’s .NET support.
AppDomain support
AppDomain support with .NET has changed significantly. Much of the
functionality related to AppDomains has been removed from .NET. The
AppDomain class and its public API remain the same. The most
significant change is that the .NET runtime only allows a single
AppDomain per application.
The entire AppDomain concept in .NET has been deprecated and
replaced with AssemblyLoadContext, which although somewhat similar,
is different. OpenEdge makes use of AssemblyLoadContext to load
assemblies with .NET rather than an AppDomain. This change
primarily impacts how ABL loads assemblies for Progress Application Server for
OpenEdge (PAS for OpenEdge). Each PAS for OpenEdge session maintains a separate
AssemblyLoadContext. This means that loading an assembly into
one PAS for OpenEdge session does not automatically load that assembly into other
PAS for OpenEdge sessions. Assemblies referenced in the
assemblies.xml file are loaded automatically at the start
of each PAS for OpenEdge session as before, but assemblies loaded dynamically after
the startup of the session will not be shared across PAS for OpenEdge sessions.
Global Assembly Cache (GAC)
.NET Framework uses a Global Assembly Cache (GAC) to store system-wide installations of commonly used assemblies. The GAC contains several assemblies shipped by Microsoft and is also available for vendors to install their own .NET assemblies. With .NET, there is no GAC. While the APIs to access the GAC are still present in .NET, many of them will throw exceptions if the application calls them from within the .NET runtime. Keep in mind that ABL applications that use any of the GAC-specific APIs will compile, but will throw exceptions at runtime.
Acquiring assemblies for your application
With .NET, the installation model has shifted from an OS-wide installation (GAC) to a per-application build and packaging model. For .NET, OpenEdge requires the .NET Desktop Runtime to be installed, which includes the base .NET libraries as well as WinForms packages. These pre-installed libraries comprise the host assembly cache. When locating assemblies for your application, .NET locates assemblies by name from the host assembly cache.
OpenEdge .NET applications are expected to include and ship any other libraries the
application needs to function. These assemblies should be placed in the
application’s working directory (default) or in another directory specified by the
-assemblies startup parameter.
The SDK tooling for building .NET applications has also shifted to support NuGet. NuGet is a command line tool which works with one or more NuGet feeds to download and install the packages that contain .NET assemblies. Microsoft hosts the main NuGet feed at https://www.nuget.org/ which hosts thousands of installable packages containing .NET assemblies. Additionally, individual vendors such as Telerik and Infragistics, often host their own NuGet feed. You will need to refer to your vendor's documentation for access to a NuGet feed. For an OpenEdge application, you may need to download individual NuGet packages, extract the required assemblies, and copy them to the OpenEdge application’s assemblies directory. Relying on a third-party vendor's assembly installation tool to place assemblies needed by an OpenEdge application into the GAC is no longer an option.
For applications that target .NET, you do not need to include specific version information for each assembly in the assemblies.xml file. It is sufficient to list only the name of each assembly. OpenEdge locates the assembly by its name from the assemblies directory or from the host assembly cache. If you include the version information, OpenEdge ignores it.