Hello Schneider,
As Jeff said, Visual studio can be run in WOW64, but it is a 32-bit
application.
References:
64-bit and Visual Studio 2005:
http://blogs.msdn.com/deeptanshuv/archive/2006/04/11/573795.aspx
Adam Braden clarification for Visual Studio 2008:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2311722&SiteID=1
I have do a test on my 64bit environment. I compiled the following code
into AnyCPU, x86 and x64.
static void Main(string[] args)
{
Console.WriteLine(System.Environment.GetFolderPath(Environment.SpecialFolder
.CommonProgramFiles));
Console.ReadLine();
}
The outputs are:
AnyCPU:
C:\Program Files\Common Files
x86:
C:\Program Files (x86)\Common Files
x64:
C:\Program Files\Common Files
In 32bit process, it can only load and run 32bit DLL. In 64bit process, it
can only load and run 64bit DLL or EXE.
Now we can explain your symptom:
Because VS.net is a 32bit application, it will be run as 32bit process in
64bit windows. When hosting the designer, it will load and run your program
DLL or EXE. At this time, since your DLL or EXE is compiled for any CPU and
the hosting process is 32bit, it is loaded and run as a 32bit application.
So the output is "C:\Program Files (x86)\Common Files".
Then running the application directly in 64bit windows. It is automatically
run as a 64bit application. At this time, it will output "C:\Program
Files\Common Files".
Now we can conclude that the cause of the issue is that VS.net is a 32bit
application.
Here is a good resource for you to understand programming in 64bit
application: http://msdn.microsoft.com/en-us/library/ms241064.aspx
Please let me know if you still have any question about my reply. I will
try my best to explain it to you. Thanks.
Regards,
Hongye Sun (***@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
***@microsoft.com.
This posting is provided "AS IS" with no warranties, and confers no rights.