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,
Are you familiar with the "Compile as a Library" feature in DataMiner? It allows you to compile your automation script as a library, generating a DLL that can be referenced by other scripts.
You can find a step-by-step guide in the DataMiner documentation via the link below. Please let me know if you have any questions about how it works or need help setting it up.
docs: Compiling a C# code block as a library | DataMiner Docs
Kind regards,