3

I have a Visual Studio 2012 .Net project for which I would like to create both 32-bit (x86) and 64-bit (x64) using the same solution and project, just different configurations.

I already created the four different configuration/builds (Debug, Release, Debug64, and Release64). I went to the project properties and set in the build tab the proper processor and build location.

My problem deals in how to handle the references.

For instance, I am using ChilkatDotNet45, which ships with both 32-bit and 64-bit versions. The same DLL name, not that that matters. The x86 build requires the 32-bit version of my 3rd party assemblies, such as those from Chilkat, and the x64-bit version requires the 64-bit versions of those same assemblies.

I tried adding both DLL assemblies to the references, but VS2012 refused to allow the second one saying that the assembly already exists.

I did read the other stackoverflow posting that talks a bit about targeting both processor versions, but I did not see, at least clearly, how to handle the references. Targeting both 32bit and 64bit with Visual Studio in same solution/project

I have several 3rd party assemblies that ship with 32-bit and 64-bit. How do I handle the references?

Community
  • 1
  • 1
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130

2 Answers2

2

I combined the responses in

Conditionally use 32/64 bit reference when building in Visual Studio

to find the solution. I had to use platform as the conditional test.

Community
  • 1
  • 1
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130
-1

Try to change the project type to AnyCPU

UsmanAzam
  • 539
  • 4
  • 15
  • 1
    I realize that option, but I do not see how that addresses the references issue. Also, I would like to create specific builds that target 32-bit and 64-bit. Think of the SQLite.Net distributions or any of the others that exist. I want to do the same. – Sarah Weinberger Jul 20 '13 at 22:57
  • Hope this helps you http://stackoverflow.com/questions/3442435/one-project-with-multiple-build-configurations-in-vs2010 – UsmanAzam Jul 20 '13 at 23:03
  • The builds go into different folders already. That is not my current problem. The References section is. My current folders are "x86/Debug, x86/Release, x64/Debug, and x64/Release). Each build/configuration ties to the appropriate processor. I have configurations Debug/Release/Debug64/Release64. – Sarah Weinberger Jul 22 '13 at 01:41