Forcing English language exceptions in .NET framework

后端 未结 7 1858
-上瘾入骨i
-上瘾入骨i 2020-12-25 10:28

While working with ASP.NET MVC, I have noticed that exception messages issued by the .NET framework installed on my System are in German. I\'d really prefer English messages

7条回答
  •  执笔经年
    2020-12-25 11:07

    As I just found out, the problem was indeed related to having a different test project. While I have tried setting the UI language to English in my actual project, I did not do the same in the test project, which is why the exception messages were still in German when looking at the test results.

    Setting the UI language in the test method right before the exception is thrown did the trick for me.

提交回复
热议问题