Console.Writeline working on x86 but not x64

 ̄綄美尐妖づ 提交于 2019-12-07 00:48:34

问题


I'm testing a project in visual studio 2012.

When I run my code in x86, Console.Writeline shows up in the output window. However, when I run it in x64, it does not.

I understand I can use System.Diagnostics.Debug instead, but I would really like to understand why Console.Writeline is not working, or if there is a setting somewhere.

Thanks.

Edit: An observation: The Visual Studio hosting process is disabled for both builds. When I enable it, all Console.Writeline messages show up for both x64 and x86. When I disable it again, only the x86 displays Console.Writeline.


回答1:


There should be no difference between the two. Most likely you have a configuration difference between your x86 and x64 compilation profiles. Check to make sure that you are building a console application in both cases.




回答2:


Make sure you copy settings from AnyCpu while creating x64. I had a similar problem but once I copied it, it worked fine.



来源:https://stackoverflow.com/questions/13070874/console-writeline-working-on-x86-but-not-x64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!