Change compiler errors language in Visual Studio 2013
Asked Answered
P

3

16

I installed the english version of Visual Studio 2013. The GUI is in English but compiler errors are in French. That's a nightmare when I want to Google an error...

How can I switch C# compiler output language to English ?

Pasteboard answered 20/3, 2014 at 10:4 Comment(2)
possible duplicate of Changing MsBuild error message languageTolley
@Tolley I didn't had this issue with previous verions of VS/.Net and I'm not invoking msbuild on my own. I didn't install any language pack but it might be here and I don't know how to remove it.Pasteboard
B
13

You'd have to switch your machine's system locale to English, Control Panel + Language.

That's a rather impactful change since it also changes the locale for every other program on your machine. One thing you can try (but I cannot verify) is to whack the localization file that the C# compiler uses for strings. On your machine it should be located in c:\windows\microsoft.net\framework\v4.0.30319\1036\cscui.dll. Rename the file so the C# compiler can't find it and is forced to fallback to, hopefully, English. Btw, I guessed at 1036, there are lots of French locales. Locale IDs are listed here.

Buzzard answered 20/3, 2014 at 10:17 Comment(3)
Thanks! Renaming the file works for some errors but not all (ASPNETCOMPILER/CONFIG). I'll wait to see if someone comes with a better solution than switching locale but I doubt it...Pasteboard
Thanks for the suggestion. I just renamed the whole "1036" directory (added some XXX at the end) and it worked like a charm! Next invocation of csc was already in english.Acetylene
Hello! Another dumb solution is to search in directories c:\windows\microsoft.net\framework & c:\windows\microsoft.net\framework64 for "1036" and rename all occurencies. PS: You can find your locale in list like Hans Passant mentioned or just keep only 1033 which is English defaultArdenardency
N
16

I have solved this as well. Switching language in the IDE did not worked for me, because if the MS compiler was invoked from another program (Qt Creator in my case), the language output was still in the locale language.

Solution: Remove the language you don't want from Visual Studio using the installation tool and leave only English. It's clean, you don't have to mess with the internal files and you even save some disk space.

Neighborhood answered 20/10, 2017 at 9:3 Comment(2)
This is the only approach that helps when only the build environment is used but not the IDE. Thanks!Carbuncle
Solved the issue within QtCreator for me, thanks.Acinus
B
13

You'd have to switch your machine's system locale to English, Control Panel + Language.

That's a rather impactful change since it also changes the locale for every other program on your machine. One thing you can try (but I cannot verify) is to whack the localization file that the C# compiler uses for strings. On your machine it should be located in c:\windows\microsoft.net\framework\v4.0.30319\1036\cscui.dll. Rename the file so the C# compiler can't find it and is forced to fallback to, hopefully, English. Btw, I guessed at 1036, there are lots of French locales. Locale IDs are listed here.

Buzzard answered 20/3, 2014 at 10:17 Comment(3)
Thanks! Renaming the file works for some errors but not all (ASPNETCOMPILER/CONFIG). I'll wait to see if someone comes with a better solution than switching locale but I doubt it...Pasteboard
Thanks for the suggestion. I just renamed the whole "1036" directory (added some XXX at the end) and it worked like a charm! Next invocation of csc was already in english.Acetylene
Hello! Another dumb solution is to search in directories c:\windows\microsoft.net\framework & c:\windows\microsoft.net\framework64 for "1036" and rename all occurencies. PS: You can find your locale in list like Hans Passant mentioned or just keep only 1033 which is English defaultArdenardency
W
7

Just solve same problem with Deutsch:) Do this: inside of Visual Studio:

Tools-->Options-->Environment-->International Settings. There you need to download an additional language(i.e. English) and install it.

Withdrawn answered 1/7, 2015 at 8:3 Comment(2)
If you use Qt Creator, there is one more step: Tools->Options->Kits->Select your MSVC and check 'Force UTF-8 MSVC compiler output'Ngocnguyen
If you have multiple Visual Studio installed (say 2017 & 2019) do this in the one you actually use, obviously!Palais

© 2022 - 2024 — McMap. All rights reserved.