.netcodedomsystem-codedom-compiler

fatal error CS0007: Unexpected common language runtime initialization error - the system cannot find the file specified


Please help me in solving the error fatal error CS0007: Unexpected common language runtime initialization error - the system cannot find the file specified.

When I dynamically compile (from C# forms application) the code using codedom the above error is thrown. But when I compile the same file from test project no error :(


Solution

  • While compilation using codedom, I have given the wrong path for the App.config.. After providing the correct path this error disappeared.