VS2008 - How to compile 32bit C# app on Vista64?

F

Figmo

I have an app that needs to access local MDB files using OLEDB. I
have just upgraded to Vista64 and when I run this app I get a "OLEDB.
4.0 is not registered on local machine" error. From research, I
gather that the Jet drivers are not available for 64 bit apps, but
they do have a 32 bit Jet driver on Vista 64. So the solution I
think is to force compile my assembly as a 32 bit assembly.

But I can't see how to do this. Under my assembly properties, for
Platform I only have "Any CPU". No other options. Which, as I
understand it, means the JIT will run either 32 or 64 bit depending on
the OS it's running under.

This is cool, but doesn't solve my problem. I need to run in 32 bit
mode on a 64 bit OS so I can access the Jet drivers to read my MDB
file.

Is there way I can tell VS 2008 to force compile my assembly as 32
bit?
 
M

Matt

I have an app that needs to access local MDB files using OLEDB.    I
have just upgraded to Vista64 and when I run this app I get a "OLEDB.
4.0 is not registered on local machine" error.   From research, I
gather that the Jet drivers are not available for 64 bit apps, but
they do have a 32 bit Jet driver on Vista 64.   So the solution I
think is to force compile my assembly as a 32 bit assembly.

But I can't see how to do this.   Under my assembly properties, for
Platform I only have "Any CPU".   No other options.  Which, as I
understand it, means the JIT will run either 32 or 64 bit depending on
the OS it's running under.

This is cool, but doesn't solve my problem.  I need to run in 32 bit
mode on a 64 bit OS so I can access the Jet drivers to read my MDB
file.

Is there way I can tell VS 2008 to force compile my assembly as 32
bit?

The best solution would probably be to go into Configuration Manager,
and create a new
profile (since you may want this one later) and set it up to use X86
instead of "Any CPU".
Then build that profile.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top