x64 development

B

Berryl Hesh

Hopefully not too off-topic but I'm looking for tips on how to maintain
visual studio development projects between x86 and x64 machines.

I just got a notebook with Vista "ultima" as the O/S, and tests that run
fine on my x86 machine are breaking, so far due to SQLite and SQLCe x86
dlls. I was able to get the SQLCe issues to go away in two projects by
changing the target platfor from 'Any' to x86, but not sure if the best
answer is to change every project in my solution the same way. It also
doesn't seem to have fixed my SQLite problem either.

I need to be able to switch off between both machines without hassling
everytime.

Any suggestions on how best to do so?

Thanks,
BH
 
P

Pavel Minaev

Hopefully not too off-topic but I'm looking for tips on how to maintain
visual studio development projects between x86 and x64 machines.

I just got a notebook with Vista "ultima" as the O/S, and tests that run
fine on my x86 machine are breaking, so far due to SQLite and SQLCe x86
dlls. I was able to get the SQLCe issues to go away in two projects by
changing the target platfor from 'Any' to x86, but not sure if the best
answer is to change every project in my solution the same way.

It is. In general, you should set platform to 'x86' if you 1) directly
use native x86 code, or 2) reference an assembly that itself targets
x86 specifically.

In practice, you can get away with it by marking only your executable
as x86 - that is what defines which .NET version will load, and all
other AnyCPU assemblies will follow suit anyway. But this is brittle,
because if you ever want to reuse those same assemblies in another
project, you'll get the same problem. It's better to make things
explicit by using x86 throughout.
It also doesn't seem to have fixed my SQLite problem either.

Since you do not explain what exactly the problem is, apart from
saying that something is "breaking", there isn't much that can be said
here.
 
B

Berryl Hesh

Hi Pavel

The SQLite 'problem' in my mind was that I thought I needed to use the x64
version of it, and how would I switch back and forth between environments?
Well, it turns out that the x86 SQLite dll was quite happy to execute in the
x64 system once I had every project building x86 too.

Thanks for the response and the good advice.

Berryl

Pavel Minaev said:
I just got a notebook with Vista "ultima" as the O/S, and tests that run
fine on my x86 machine are breaking, so far due to SQLite and SQLCe x86
dlls. I was able to get the SQLCe issues to go away in two projects by
changing the target platfor from 'Any' to x86, but not sure if the best
answer is to change every project in my solution the same way.

It is. In general, you should set platform to 'x86' if you 1) directly
use native x86 code, or 2) reference an assembly that itself targets
x86 specifically.

In practice, you can get away with it by marking only your executable
as x86 - that is what defines which .NET version will load, and all
other AnyCPU assemblies will follow suit anyway. But this is brittle,
because if you ever want to reuse those same assemblies in another
project, you'll get the same problem. It's better to make things
explicit by using x86 throughout.
It also doesn't seem to have fixed my SQLite problem either.

Since you do not explain what exactly the problem is, apart from
saying that something is "breaking", there isn't much that can be said
here.
 

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