views:

29

answers:

1

Given a relatively big home-grown framework written in .NET. For an additional lower priority feature, we would like to use a third party open source project. However, this third party project is not safe to run in x64 mode, so we force it to compile 32bit. Due to this referenced 32bit assembly, VS wants our entire framework being compiled to 32bit via cascading dependencies.

Question1: Is there a way to isolate the rest of the framework and allow that to compile to any platform? Question2: Assume that my framework runs in x64 mode, and during runtime I load a forced 32bit assembly. Would that work or would it throw AssemlyLoadWhateverException?

+1  A: 

Answers:

  1. You can only compile as Any Platform if none of the referenced assemblies are 32-bit only.
    You can load the 32-bit only assembly using Assembly.LoadFrom and call it using Reflection, and still compile to any platform.

  2. That will not work. EDIT: It seems to work; I'm not sure why.

SLaks