We have a great VS 2010 solution, which is mostly C # code, but there are several native DLLs that various C # projects (including our modular DLL) depend on. We are working on handling support for 32-bit and 64-bit versions of our libraries. So now we are creating our own DLLs, both 32-bit and 64-bit. The problem is that many of our C # projects have post-build events that copy the necessary DLLs to the TargetDir project. Now that we have two different versions of the native DLLs (32 and 64 bits), I need to specify the correct directory for copying the native DLL. Initially, I thought I could just use $ (Platform) in a path like this:
copy $(SolutionDir)\NativeDll\$(Platform)\$(Configuration) $(TargetDir)
But this does not work, because $ (platform) is a project platform, not a solution level platform. In this case, $ (Platform) is "Any processor." From what I see, looking at event macros after assembly in a C # project, there seems to be no way to access the solution level platform that is being built. Is there a better way to achieve my goal?
c # 64bit visual-studio 32bit-64bit post-build-event
Keith Hill Jun 22 '11 at 20:20 2011-06-22 20:20
source share