I'm using the System.CodeDom
features to compile code at run time and I wonder if I could specify a compiler parameter or other workaround to display the compiler errors in English language instead of using the system's default language.
However, in the MSDN documentation I can't find anything related to the displayed language:
When I want to display compiler errors in a specific language under Visual Studio IDE when building a project what I do is change the current culture, then I tried to set the culture in my application and also inside the file that I'm compiling from my application, but firstly that does not take effect, and secondly I prefer to avoid possible tricks like this, because possibly it will require automated code generation (imports, references, and code when calling CodeDomProvider
compiler):
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-Us")
Thread.CurrentThread.CurrentUICulture = New CultureInfo("en-Us")
System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory
. You can see this yourself in Executor.cs, GetRuntimeInstallDirectory method) – Keys