Hi,
I've created an automation script in DIS, which I've published to a DMA, this script fails validation, but Visual Studio is happy. Validation is failing on the first line of the script
using System;
I don't understand why it is failing there. We have lots of scripts that start way. I tried to create a new script directly in the Cube editor, containing only the using System; with nothing else and that also fails validation.

As you can see, there really is nothing in this script, so I don't understand why validation is failing at this point. Any help will be greatly appreciated.
If it's of relevance, the machine running Cube is running Server 2025
Hi Chris,
When a script does not contain a Script class, DataMiner automatically wraps the code in one. As a result, your code is effectively transformed into the following, which is invalid C#:
using Skyline.DataMiner.Automation;
public class Script
{
public void Run(Engine engine)
{
using System;
}
}
For more information see: https://docs.dataminer.services/dataminer/Functions/Automation_module/Using_CSharp/Adding_CSharp_code_to_an_Automation_script.html?#script-class