Linqpad On Vista 64 With A 32-bit Assembly, 32-bit assemblies on a 64 bit system |
Linqpad On Vista 64 With A 32-bit Assembly, 32-bit assemblies on a 64 bit system |
Jun 8 2009, 07:03 PM
Post
#1
|
|
|
|
Here's the scenario. I'm trying to access data in an Access 2007 db file. I can get this to work fine in Visual Studio using OLEDB with this provider... Provider=Microsoft.ACE.OLEDB.12.0
This works fine when compiled as a 32-bit dll. However, if I create a wrapper DLL and reference the 32-bit dll in LinqPad, then LinqPad throws the following. An attempt was made to load a program with an incorrect format. Well, a little research shows that message happens when you attempt to load a 32-bit dll into a 64-bit app. It seems then, that Linqpad is runtime compiling itself as a 64-bit program since it's in a 64-bit environment, is this correct? Is it possible to force it compile as a 32-bit program so I can reverence native 32-bit dlls, perhaps with a command line switch? To confirm this, I built the wrapper dll as a 64-bit program, and it throws the same error in a Visual Studio unit test. If I use the 64-bit wrapper dll in LinqPad then I get this... InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. Research shows that this message indicates that the Access 32-bit dll is being loaded by a 64-bit app. |
|
|
|
mschwab Linqpad On Vista 64 With A 32-bit Assembly Jun 8 2009, 07:03 PM
JoeAlbahari You can hack LINQPad so as to force 32-bit executi... Jun 10 2009, 05:52 AM![]() ![]() |
|
Lo-Fi Version | Time is now: 23rd November 2009 - 03:58 AM |