views:

36

answers:

1

I have a .NET application that uses a COM component. The application itself is "Any CPU", but the COM component has a 32-bit and 64-bit version.

The article http://msdn.microsoft.com/en-us/magazine/cc188708.aspx is clear on what to do for registration-free COM. But what should one do for:

  • "Any CPU" app
  • dependent Assembly :
  • Assembly1 uses COM component "Foo", foo has a 32-bit and 64-bit version with the same filename (we did not create Foo, it was made by a third party).

One way that would work is to create separate app manifests for 32-bit release and for 64-bit release. That way, each manifest file can contain the correct size and hash for the COM component. I'd like to avoid this, though.

Is it possible, somehow to set this up in Visual Studio with no hassle? Is it possible to have a single folder (with x64, x86 subfolders for the COM component) where the application will run both both platforms seamlessly?

Any pointers in the right direction would be greatly appreciated! I'm probably just overlooking some simple switch or setting somewhere.

A: 

The processorArchitecture element lets you write an <assemblyIdentitiy> that is specific. Add two of them, one that uses "x86", the other "amd64". It is documented in this (very poor) MSDN Library article.

Hans Passant