I am using Visual Studio 2012 with the installation of Update 3. I am using C # to target the .NET framework 4.5.
I have a method that starts as follows:
public void Open(System.String filePath) { if (!System.IO.File.Exists(filePath)) throw new FileNotFoundException(. . .); . . . }
The value of the filePath parameter is filePath follows:
"C:\\Users\\Jonathan.DeCarlo\\Source\\Repos\\PoliticalClassifier\\src\\PoliticalClassifier.DataSource.Tests\\TestFiles\\Social_Economic_DataMicro.xlsx"
This path really exists on my machine. This application is compiled as "Any processor." I run it on a computer with Windows 7 x64 installed. If I allow applicationactin to work as an x64 process, then a FileNotFoundException is FileNotFoundException even if the file exists. If I make the application run as an x86 process, then the exception is NOT thrown (which should be the case).
Why System.IO.File.Exists(filePath) return a different result when the application runs as an x64 process and not an x86 process?
source share