I'm trying to run an automation scripts but I'm getting errors after pressing 'Validate' button.
After checking the SLAutomation log, I can see this is caused by the type System.ValueTuple2.
How can I overcome this to run the script?
Here are the error messages:
2023/03/20 19:03:16.125|SLAutomation.exe 10.2.2241.34|3760|22276|CScriptLoader::LoadScriptFromXML|INF|-1|Loaded info for script SLC-AS-CSVDataSource
2023/03/20 19:03:16.234|SLAutomation.exe 10.2.2241.34|3760|22276|CCompilationManager::CompileToLibrary|DBG|-1|Library compilation failed (0x80004005h): (70,10): error CS8137: Cannot define a class or member that utilizes tuples because the compiler required type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' cannot be found. Are you missing a reference?
(70,10): error CS8356: Predefined type 'System.ValueTuple2' is declared in multiple referenced assemblies: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' (124,10): error CS8137: Cannot define a class or member that utilizes tuples because the compiler required type 'System.Runtime.CompilerServices.TupleElementNamesAttribute' cannot be found. Are you missing a reference? (124,10): error CS8356: Predefined type 'System.ValueTuple
2' is declared in multiple referenced assemblies: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
(85,11): error CS8356: Predefined type 'System.ValueTuple2' is declared in multiple referenced assemblies: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' (128,11): error CS8356: Predefined type 'System.ValueTuple
2' is declared in multiple referenced assemblies: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
(132,10): error CS8356: Predefined type 'System.ValueTuple`2' is declared in multiple referenced assemblies: 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
Hi Bruno,
Could you please check the version of the .NET Framework version you are using and if you have the following NuGet System.ValueTuple 4.5.0 installed?
It was needed for older versions of C# and .NET Framework but starting in C#7 and .NET Framework 4.7 it is included as part of the language definition.
Since the latest versions of DataMiner already support that you should not need to include the NuGet.
For more info check this link
After checking it and removing the “System.ValueTuple 4.5.0” NuGet, it started to work!
Thank you João!