I have some problem with AnyCPU vs x86 compiler setting, but if I understand it correctly my problem seems to be the other way around as it is normally.
Currently everything is residing on a Win 7 64 bit machine with Visual Studio 2010. The application in question is Dot.NET 3.5. Visual Studio is in English, but part of the error is in German which is the language of the OS.
Project E: the main project/solution which includes 3 sub-projects, 2 as DLLs and 1 as exe. VB.net 3.5, compiled as x86 as it needs OleDB to Access.
Originally started on VS 2008 or even VS 2005 on a 32bit machine in WinXP.
Project ADB: vb.net exe, needs to be possible to start as standalone and I need to be able to access the forms from project E.
This started as a separate project, which my have been Dot.Net 4.0 in VS 2010, but I think it was still on the 32 bit machine/WinXP if this is relevant.
Needs OledDB to MS Access, so the standalone exe needs to be x86.
But if I compile it as x86 (Project Properties > Compile > Advanced Compile Options) as part of the solution, I get a build error (see below). If I change to AnyCPU, it works as part of the solution including access to OleDB (which should mean that it's x86, right?), but the standalone can't use OleDB anymore (which means it isn't x86, right?).
Project Au: vb.net DLL, included in references of E, no need for OleDB. If compiled as x86 I get the same error as in project ADB. Works if compiled as AnyCPU.
Was added into VS 2008 on the 32 bit machine.
Project S: C# DLL, no need for OleDB. Compiled as x86 and included in references of E, this works.
Is a download from the web, was added into VS 2008 on the 32 bit machine.
The build error is the following:
Die Datei oder Assembly "file:///X:/Entw/E/VB.net/ADB/bin/Debug/ADB.exe" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
Translated:
Could not load file or assembly 'XYZ' or one of its dependencies. An attempt was made to load a program with an incorrect format.
The OleDb error I get when starting ADB as AnyCPU standalone is the following:
Der 'Microsoft.Jet.OLEDB.4.0'-Provider ist nicht auf dem lokalen Computer registriert.
This is the usual no-64bit JET error warning:
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
Now, as I understand it, normally if the main project was AnyCPU and the sub project was specific I would get the build error since it would try to access x86 from AnyCPU which in this case would be x64. But here I try to access x86 from x86 which doesn't work, but accessing AnyCpu (which should be x64) from x86 works?
If necessary I can give more information and all the configuration files etc.
I'm sorry if I have written this confusingly, but I am extremely confused about this issue.