How to change MSBuild error message language?

前端 未结 8 1036
渐次进展
渐次进展 2020-12-31 07:33

I\'m on a Japanese system and when I run MsBuild.exe to build a Visual Studio project, I get a mix of Japanese and English in the output:

C:\\path\\to\\solut         


        
8条回答
  •  情歌与酒
    2020-12-31 08:00

    I had a problem with logfiles being encoded with UTF-8 multiple times on a buildserver. This makes solutions like changing system language or deleting all the localizations for all the software undesirable. So i had to find an option to set system language in console.

    Most of the time, you should be happy with using chcp 437 command at the begining of your .cmd file. This will switch to the official "hardware" codepage 437, which is included as part of your PC BIOS. It does, however, include characters for european languages, even if Microsoft calls it "OEM United States".

    To exclude all the languages, except for readable english, you should use codepage 20127, which contains ASCII-only charachers. All "extended" characters will be rendered as ? (question marks). This is an extreme solution and only use it when nothing else works, as it will ruin your output if it happens to have any extended characters. I'm not sure it's a good idea, 'cause it's not and OEM charset, but it worked for me.

提交回复
热议问题