11

I've got a 32 bit and a 64 bit .NET assembly from a supplier. They have the exact same interfaces in them (same classes, same methods, etc.)

For some reason, I can never run one type on the other platform. What I've been doing thus far is simply to remove the references and then recompile as appropriate.

Is there a simpler way to do this?

EDIT

I was thinking SVN could be co-opted to solve this somehow?

EDIT

The assemblies are not in GAC. And also, the need arises because I'm building the same program on both platforms, rather than trying to run something built on one platform on the other.

Carlos
  • 5,991
  • 6
  • 43
  • 82

3 Answers3

8

maybe this helps: Conditional Reference in VS 2010

EDIT: here is a better description: Conditionally use 32/64 bit reference when building in Visual Studio

Community
  • 1
  • 1
wimh
  • 15,072
  • 6
  • 47
  • 98
1

You can't have the same application using mixt assemblies. You can use only the same type of asssembly x86 or x64.

You can't run x64 app on 32 bit OS but otherway around IS possible.

Liviu Mandras
  • 6,540
  • 2
  • 41
  • 65
1

Tell your vendor to compile with the AnyCPU flag on and abstract all of their internal platform-dependent calls programmatically instead of asking the consumer to do it for them.

If they won't do it, you could write your own proxy using reflection but I don't recommend it. Maintaining that component over time would be a pain.

xcud
  • 14,422
  • 3
  • 33
  • 29
  • That second EDIT ("I'm building the same program on both platforms") was an important one; it invalidates my developer RAWR moment ;) – xcud Nov 16 '10 at 16:00