Console.Writeline工作在x86而不是64位 [英] Console.Writeline working on x86 but not x64

查看:189
本文介绍了Console.Writeline工作在x86而不是64位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio测试项目2012

I'm testing a project in visual studio 2012.

当我运行我的代码在x86上, Console.Writeline 在输出窗口中显示出来。然而,当我在64位运行它,它没有。

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.

我明白我可以使用 System.Diagnostics.Debug 代替,但我真的想明白为什么 Console.Writeline 不工作,或者如果有一个设置的地方。

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.

感谢。

编辑:的观察:在Visual Studio宿主进程被禁用这两个基础之上。当我打开它,所有的 Console.Writeline 的消息显示为x64和x86。当我再次禁用它,只有86显示 Console.Writeline

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.

推荐答案

有应该是两者之间没有什么区别。最有可能你有你的x86和x64编译配置文件之间的结构的不同。检查以确保您正在构建在两种情况下的控制台应用程序。

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.

这篇关于Console.Writeline工作在x86而不是64位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆