I wrote a stand alone x86 app for a specific purpose, which I call (from my x64 built app/solution) by creating a new process with a text file path as an argument.
The format of the data in the text file I obviously want in only one place, so I put this in a stand alone project in the x86 app and then I (absent mindedly) referenced the x86 dll of that project directly from my x64 project.
Yet, it is working correctly. How? That is, a class that is defined (and only defined) in the x86 solution is used in my x64 code and then I write the contents to a file, and this x64 project knows the existence of this class only because I added a reference to a x86 dll. When i remove the reference, the x64 project doesn't compile.
There is no AnyCpu anywhere, everything is x86 or x64. I'm using .NET Framework 4.7.2.
I am assured by many posts on here and everywhere else that mixing x86 and x64 dlls does not work. What am I missing?
I wrote a stand alone x86 app for a specific purpose, which I call (from my x64 built app/solution) by creating a new process with a text file path as an argument.
The format of the data in the text file I obviously want in only one place, so I put this in a stand alone project in the x86 app and then I (absent mindedly) referenced the x86 dll of that project directly from my x64 project.
Yet, it is working correctly. How? That is, a class that is defined (and only defined) in the x86 solution is used in my x64 code and then I write the contents to a file, and this x64 project knows the existence of this class only because I added a reference to a x86 dll. When i remove the reference, the x64 project doesn't compile.
There is no AnyCpu anywhere, everything is x86 or x64. I'm using .NET Framework 4.7.2.
I am assured by many posts on here and everywhere else that mixing x86 and x64 dlls does not work. What am I missing?
From Hans Passant in comment,
The setting that actually matters is Project > Properties > Build > "Platform target"
I said in the question there was no use of AnyCpu but this was false - when I checked this setting for the project, it was targeting AnyCpu.