I have a dependency on an unmanaged dll. I can compile the unmanaged dll in both x86 and x64.
I want to add my project both the x64 and x86 dlls, so it could dynamically choose between the x64 or x86 dlls depend on the system environment execution.
I know I can have to releases, one as x64 and one as x86, but I would rather it to behave like an AnyCpu single dll.
Edit1:
I don't want to user [DllImport] attribute. I'm searching for a more elegant way to do so.