Skip to main content

Command Palette

Search for a command to run...

Octopus Script Step Error: "Common Language Runtime detected an invalid program"

Published
1 min read
Octopus Script Step Error: "Common Language Runtime detected an invalid program"

You might run into the following error when deploying with Octopus and one of your tasks is executing a C# script (ScriptCS) on the target machine.

octopus script error

ERROR: Script execution failed. [InvalidProgramException] Common Language Runtime detected an invalid program.
Exit code: 1
The remote script failed with exit code 1

This is most likely because .NET 4.5.2 is not installed on the machine. If you install that the error should go away.

There's a bit more info available on the following links:

  • https://github.com/dotnet/corefx/issues/320
  • https://github.com/dotnet/corefx/pull/687

More from this blog

Søren Kruse | .NET, C# and Azure

51 posts