I have a question regarding the .NET SDK. When programming a connector with Visual Studio with DIS, how can I specify the .NET SDK version? Or how can I update an existing project to a newer SDK version?
Hi Michael,
To avoid confusion, the global.json file is only relevant for solutions that make use of the Skyline.DataMiner.Sdk SDK (like Automation script solutions) Such projects have the following in the csproj: <Project Sdk="Skyline.DataMiner.Sdk">. Connectors, however, do not use this SDK (you can see this because QAction project have the following in their csproj files: <Project Sdk="Microsoft.NET.Sdk">).
The NuGet you mention only specifies netstandard2.1 as possible target, but that is not supported by .NET Framework 4.8. See supported frameworks.
What you could do:
- Contact the maintainers of the repo and request if it's a possibility to also have a netstandard2.0 target included in the NuGet
- If the license allows this, build the source code and put the created DLL in the DLLs folder of the connector solution and add a reference to it from the QAction (note, if this approach is used, all transitive DLLs must also be included).
Hi Pedro,
Thank you very much for the answers.
I am currently trying to build the DLL myself according to your suggestion (2) and set a reference to the Qaction.
Hi Tom and Pedro
Thank you so much for your replies!
I tried using Tom's version. I created a new solution and a global.json file. I then get an error message: "Package 'Skyline.DataMiner.Sdk 2.5.2' has a package type 'MSBuildSdk' that is not supported by project 'Internal\QAction_Helper'." Even after deleting the Action_helper, I still get an error message about QAction_2.
I actually wanted to create a solution and add EmberPlus.ConsumerLib, but when I do that, I get the following error message:
Package EmberPlus.ConsumerLib 0.0.13 is not compatible with net48 (.NETFramework,Version=v4.8). Package EmberPlus.ConsumerLib 0.0.13 supports: netstandard2.1 (.NETStandard,Version=v2.1)
How can I resolve this version conflict?
Thank you
Hi Michael,
Connector QActions currently target .NET Framework 4.8. (You can see this when you double click the project file in the solution explorer:<TargetFramework>net48</TargetFramework>)
On DataMiner, QActions are compiled using the .NET Compiler Platform (version 2.9) and during compilation it uses assembly references of the latest version of the .NET Framework it found on the Agent (see also QAction compilation).
Note that there is currently no support to let QActions target newer runtimes such as e.g. .NET 10.