Hello,
I created an automation script solution in Visual Studio.
In my project (Org.OpenAPITools), I added a custom library and tried to publish it to DataMiner.
However, my library does not appear in the DLL references inside DataMiner Cube.
What’s even more confusing is that in DataMiner Cube, there are several using statements automatically included that I never wrote in my code.
My local usings:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Skyline.DataMiner.Automation;using Org.OpenAPITools.Api;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Extensions;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
Usings shown in DataMiner Cube (Automation Scripts):
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Skyline.DataMiner.Automation;using Org.OpenAPITools.Api;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Org.OpenAPITools.Extensions;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
using System.Security.Cryptography;
using System.Threading.Tasks;
using Xunit;
using System.Linq;
using System.IO;
using System.Reflection;
using System.Net;
using Microsoft.Extensions.Logging;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Collections;
using System.Text.RegularExpressions;
using System.Runtime.CompilerServices;
using System.Text.Json.Serialization;
using Polly.Timeout;
using Polly.Extensions.Http;
using Polly;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
When validating the script in DataMiner Cube, I get around 3000 errors.
How I added the library:
I simply created a new folder in the project and copied the library files into it manually.
Visual Studio shows no errors locally.
Hi Ömer,
when their is a nuget package available, the preferred way is to add it via the nuget package manager.
When it is a custom library you created and they not change that often, you could create your own nuget package and add them via the package manager, then Dataminer handles the deployment on the DMA for you.
You could also store them manually in e.g. C:\Skyline DataMiner\ProtocolScripts\DllImport\ or C:\Skyline DataMiner\Files\ on the DMA. But you still need them in the project too and need do the linkings manually.
For frequently updated libraries under development I would be also interested in a better solution, maybe someone has a more comfortable workflow.
Best regards,
Felix