Why do agents receive an error "Could not load type 'System.RuntimeCompiler..." in the console?
Error received in the console:
"Could not load type 'System.RuntimeCompilerServicesExtensionAttribute' from assembly 'mscorlib, Version=184.108.40.206, Culture=neutral, PublicKeyTokem="
We require .Net Framework Version 4.0 (either the full version, or Client Profile and Extended components) or .Net Framework Version 4.5 for the standard use of the Oracle B2C Service CX Console.
If a custom Add-In is that was compiled and assembled using the .Net Framework Version 4.5 or newer is used, the same version of the .Net Framework Version needs to be used for avoiding the error described above and for a normal functionality of the custom Add-In.
In this scenario, upgrading the .Net Framework to the required version of the custom Add-In resolves the error.
This error appears when a custom Add-In was compiled and assembled using .Net Framework 4.5, but then it is used on a computer that has .Net Framework 4.0 installed.
In the .Net Framework 4.5, the ExtensionAttribute class was moved from System.Core to mscorlib. There is a type forwarder in System.Core that points to the new location in mscorlib. If you compile an Add-In against Net Framework 4.5, it will expect to find ExtensionAttribute in mscorlib. If you then run it against Net Framework 4.0, you will get this exception because in actually lives in System.Core in 4.0.