Hi everyone, hope you all are well!
I need help with a problem when using the FileSelector, where I keep getting the following error message:
Script Failure (LogoManagementIAS): EXIT:
"Run|Something went wrong:
System.MissingMethodException: Method not found:
'Void Skyline.DataMiner.Utils.InteractiveAutomationScript.InteractiveController..ctor(
Skyline.DataMiner.Automation.IEngine,
Microsoft.Extensions.Logging.ILogger
)'.
at LogoManagementIAS.Script.RunSafe(IEngine engine)
at LogoManagementIAS.Script.Run(IEngine engine)"
I have tried downgrading and upgrading the version of Skyline.DataMiner.Utils.InteractiveAutomationScript, but nothing worked so far.
The DIS in Visual Studio and the Validate button in Cube show no errors.
Both client and server versions were upgraded recently, prior to 10.6.x.
The implementation in the code is as follows:
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Utils.InteractiveAutomationScript;public class Script
{
private InteractiveController controller;try
{
RunSafe(engine);
}private void RunSafe(IEngine engine)
{
controller = new InteractiveController(engine);
var fileSelector = new FileSelector
{
IsRequired = true,
AllowMultipleFiles = false,
PlaceHolder = "Select the logo image file (.png, .jpg, .jpeg, .svg)",
Tooltip = "Send the logo image file to Dataminer.",
ValidationText = "A valid image file is required (.png, .jpg, .jpeg, .svg).",
AllowedFileNameExtensions = new[] { ".png", ".jpg", ".jpeg", ".svg" },
};
dialog.OkButton.Pressed += (sender, args) =>
{
if (fileSelector.UploadedFilePaths == null || fileSelector.UploadedFilePaths.Length == 0)
{
fileSelector.ValidationState = UIValidationState.Invalid;
return;
}string uploadedFilePath = fileSelector.UploadedFilePaths[0];
string targetFolder = ...;
fileSelector.CopyUploadedFiles(targetFolder);
}
}
}
Below is the list of DLLs imported into my DMA by the DIS Publish button (exactly as generated by DIS):
System.Numerics.dll
System.ComponentModel.DataAnnotations.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\system.buffers\4.5.1\lib\net461\System.Buffers.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\system.numerics.vectors\4.5.0\lib\net46\System.Numerics.Vectors.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\system.runtime.compilerservices.unsafe\6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\system.memory\4.5.5\lib\net461\System.Memory.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\microsoft.extensions.primitives\8.0.0\lib\net462\Microsoft.Extensions.Primitives.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\system.diagnostics.diagnosticsource\8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\system.threading.tasks.extensions\4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\microsoft.bcl.asyncinterfaces\8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\microsoft.extensions.dependencyinjection\8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\microsoft.extensions.logging.abstractions\8.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\system.valuetuple\4.5.0\lib\net47\System.ValueTuple.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\microsoft.extensions.options\8.0.0\lib\net462\Microsoft.Extensions.Options.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\microsoft.extensions.logging\8.0.0\lib\net462\Microsoft.Extensions.Logging.dll
C:\Skyline DataMiner\ProtocolScripts\DllImport\skyline.dataminer.utils.interactiveautomationscripttoolkit\10.5.8.1\lib\net48\Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit.dll
Any guidance on how to properly handle the new ILogger dependency in IAS, or which versions are compatible with DataMiner versions prior to 10.6.x, would be greatly appreciated.
Thanks in advance!
Hi,
Could you check if the 'C:\Skyline DataMiner\Files' folder contains a 'Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit.dll' DLL file? It could be that some old version of the toolkit is being loaded instead of the version that your script needs.
Hi Thomas, thank you for your response! Indeed it was the problemn. Now the script works.
Update: I tried using the IAS without the FileSelector (just dialog and dropdown), and I'm still getting the same error.