Quick background: I develop C# in VS2008 under .net 3.5 on a Vista-x64 machine
I recently switched to Vista-x64 and after some searching, I still feel that I do not completely understand interplay between OS and the .net framework. I would like some correction/clarification regarding this.
The following is my understanding of the development process (please correct if I am mistaken):
When I setup my project, I can set the platform target: x64, x86, AnyCpu. As I understand, AnyCpu will target the current platform (in my case x64). I can also target x86 and still execute it (due to WoW64).
I assume when I target x64, the program will use the 64-bit .net framework 3.5, and similarly 32-bit framework for x86. Is this correct?
What confuses me is when I target x64 and print out the platform information, it prints “WIN32NT“. This leads me to believe “WIN32NT” is not what I think it is, but I have not been able to find out much about this. What is this?
ComputerInfo computerInfo = new ComputerInfo();
Console.WriteLine("{0,-30}:\t{1}", "Platform", computerInfo.OSPlatform);
Thanks.
It doesn’t really help, but all the environments return win32nt… it’d be helpful if they’d return win64nt wouldn’t it?
Are you finding any other problems? Or just seeking knowledge here?
Try checking your IntPtr size. It’ll let you know if your app is running in 64 bit mode (I think)
http://msdn.microsoft.com/en-us/library/system.intptr.size.aspx
http://blogs.msdn.com/kstanton/archive/2004/04/20/116923.aspx