MQ

 View Only

Moving away from .NET Standard Libraries in MQ v9.4 and support for .NET8

By Saugato Adhikary posted 11 days ago

  

IBM MQ .NET standard libraries have been in use over past many years to develop MQClient applications. The reason behind the idea of .NET Standard was to establish greater uniformity in the .NET ecosystem. 

However .NET 5 and later versions (.NET 8) adopt a different approach to establish uniformity that eliminates the need for .NET Standard in most scenarios. Ref: https://devblogs.microsoft.com/dotnet/the-future-of-net-standard/

Going back to the year 2020, with the release of .NET 5, Microsoft had announced that they would not be releasing a newer version of .NET Standard, however .NET 5 and all future versions will continue to support .NET Standard 2.1 and earlier. Check out this microsoft page for further insight,  Ref: https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-1-0

IBM as well had planned to deprecate the .NET Standard libraries in MQ v9.3.1, so that customers/developers who are still using these libraries become aware of its removal in the future. Any developer who would refer .NET Standard libraries, and build their application with the same would receive a warning about deprecation (a warning CS0618 during compile time).

From IBM MQ 9.3.1, the IBM MQ .NET client library built using .NET Standard had been available under a new folder “netstandard2.0” (part of the product) -

On Windows: MQ_INSTALLATION_PATH\bin\netstandard2.0.

On Linux: MQ_INSTALLATION_PATH\lib64\netstandard2.0

The .NET Standard libraries were separately available, and not as part of the regular .NET libraries found in the MQ_INSTALLATION_PATH/bin folder.

While the IBM MQ .NET client library built using .NET 6 as the target framework is available in the following locations -

Windows: MQ_INSTALLATION_PATH/bin

Linux: MQ_INSTALLATION_PATH/lib64

With the release of MQ v9.4, the .NET Standard libraries have been removed. As part of this action, the folder structure created inside the product bin folder has also been removed, and none of it is going to be a part of MQ product anymore. The following directories are completely removed.

On Windows: MQ_INSTALLATION_PATH\bin\netstandard2.0

On Linux: MQ_INSTALLATION_PATH\lib64\netstandard2.0

How to migrate to newer version?

MQ v9.3 was out in June 2022; hence it will be in support for eight more years (five plus three), which means for customers that need it, the .NET Standard libraries can still be used after its removal from v9.4. However, it is recommended to upgrade to the latest versions to avoid security vulnerabilities.

On the other hand, customers who wish to migrate to MQ v9.4 from lower versions and are using .NET core applications, can simply replace the old .NET Standard libraries with new .NET 8 built libraries found in the below location(s), 

Windows: MQ_INSTALLATION_PATH/bin

Linux: MQ_INSTALLATION_PATH/lib64

and change the target framework to “net8.0” and version to “8.0.0” in the runtimeconfig.json file of the application. 

For framework applications, a recompilation would be required after referring the .NET 8 libraries. In any case, a recompilation is recommended to create appropriate folder structure with the correct .NET version.

Evidently, nuget packages from v9.4 onwards will contain .NET 8 built libraries, and there will be no .NET Standard libraries shipped along with it. It is recommended for existing IBM customers to upgrade to the latest MQ versions, and for new customers to opt for MQ v9.4 LTS.

0 comments
23 views

Permalink