NuGet use in System Development

NuGet use in System Development

We are proud to announce the initial release of a new framework based on DIS and CI/CD that will allow the use of shared code and libraries through the standardized use of NuGet packages. This will dramatically increase the efficiency and quality of all connectors and automation scripts.

DataMiner Integration Studio (DIS) and our CI/CD pipeline now provide tools to produce and consume NuGet Packages.

  • NuGet? NuGet is the package manager for the .NET framework.
  • NuGet packages? A package is a collection of DLLs (it can also contain other items) with well-tested code that can easily be distributed, upgraded, and shared. The NuGet Gallery (nuget.org) is the central package repository used by all package authors and consumers.

Consuming NuGets

Ever needed to work with Azure? There’s a library out there that can save you some time. Ever been annoyed at having to make your own SOAP headers and trailers? There’s a NuGet for that as well. Trying to figure out how to make a QR code for your users? Of course, there’s a library for that!

To consume NuGet packages in your Visual Studio protocol or automation script solution, just go to the NuGet Manager, search for existing NuGets, and install them.

When DIS compiles the automation script or protocol, it will extract the required DLLs from the NuGets and save them alongside the protocol.xml/script.xml. Then the folders containing the DLLs need to be placed under the Skyline DataMiner/ProtocolScripts/DllImport folder.

Note: Support for subfolders in the ProtocolScripts folder has been introduced in DataMiner 9.6.12 (RN 23565).

The notion of the DllImport subfolder of ProtocolScripts has only been introduced in DataMiner 10.0.10 (RN 26605). This means that prior to DataMiner 10.0.10, only the Files and ProtocolScripts folder were used as hint paths. For example, when you have e.g. the following QAction@dllImport value “slc.lib.common\1.1.4.2\lib\net462\SLC.Lib.Common.dll”, it will try to find the assembly at the following location: C:\Skyline DataMiner\ProtocolScripts\slc.lib.common\1.1.4.2\lib\net462\SLC.Lib.Common.dll”.
Starting from DataMiner 10.0.10, the ProtocolScripts\DllImport folder has been added as an additional hint path (which is probed before the Files and ProtocolScripts folders). For the previous example, this means the following path would be tried first: “C:\Skyline DataMiner\ProtocolScripts\DllImport\slc.lib.common\1.1.4.2\lib\net462\SLC.Lib.Common.dll”.

Also note that only from DataMiner 10.0.10 onwards, subfolder paths for assemblies in a .dmprotocol package will be preserved during installation. This means that prior to DataMiner 10.0.10, you have to put the DLLs in the correct subfolder manually if a subfolder structure should be used.

Leave a Reply