I’m getting the following error when attempting to run a C# script:
20:24:05 Error | Unhandled Exception: System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
20:24:05 Error | at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
20:24:05 Error | at System.Reflection.Assembly.LoadFile(String path)
20:24:05 Error | at ScriptCs.Hosting.ModuleLoader.Load(IModuleConfiguration config, String[] modulePackagesPaths, String hostBin, String extension, String[] moduleNames)
20:24:05 Error | at ScriptCs.Hosting.ScriptServicesBuilder.LoadModules(String extension, String[] moduleNames)
20:24:05 Error | at ScriptCs.Application.Run(Config config, String[] scriptArgs)
20:24:05 Error | at ScriptCs.Program.Main(String[] args)
A portion of the C# script (seems to be failing on line 1):
#r "C:\\Program Files\\Octopus Deploy\\Octopus\\Octopus.Client.dll"
using Octopus.Client;
using Octopus.Client.Model;
// edited for brevity...
This script step is running on a worker in the Default Worker Pool on my Octopus Cloud instance. This used to work up until today.