This is a feature of 64-bit Windows.
In x64, you have two folders with system files: system32 and SysWOW64 .
If you put something in system32 , this will be visible to all 64-bit applications. SysWOW64 exists for compatibility reasons - everything that fits there will be displayed by 32-bit applications (sic!).
So, with regard to .NET, the file does not exist. It works for notepad because notepad.exe is present in both of these directories.
You can check this behavior. Create a text file in one of the directories, but not in the other, and verify its existence. Then change the project configuration (right-click on the solution → Configuration Manager) between x86 and x64 and get the result.
source share