1

Is there an easy way to copy a 64 bit Visual Studio 2010 project to a 32 bit project without needing to set some properties again??? (Or even make a project that works for both 32 bit and 64 bit machines???)

See details:

I have a project I compile in 64 bits machine, and runs in 64 bits machine. (DLL for Autocad Plug in)

That DLL can work in 32 bit machines as well, but there's a problem. I do can load it in Autocad. But at any point of the code where my DLL calls a method from Autocad.Interop libraries, those methods cannot be found.

The same goes for the 32bit version trying to run in 64 bit Autocad. So, 64 bit project only runs in 64 bit Autocad. And 32 bit project only runs in 32 bit Autocad.

That's because interop libraries are different from 64 to 32 bit Autocad applications.

I came up with a solution: create a copy project taking the 32 bit autocad.interop as reference. That compiles and runs fine. (It means I have a 32 bit reference in my machine, but it doesn't work for my 64 bit autocad)

Now, my generated 32 bit project can work in 32 machines, but not in 64.

But I need to keep copying files from the 64 project to the 32 project. What I do is to erase and exclude all 32 files from the 32 project and replace by the 64 files. Then include again.

That would be good if I had not to set all resources to Embedded Resources again (because they are reset to Resource).

So, how can I do this in an easier way???

Daniel Möller
  • 84,878
  • 18
  • 192
  • 214
  • 3
    You can target both 32 bit and 64 bit in the same project. For some dlls that are specific to 32 bit or 64 bit, you will have to modify **YourProject.csproj** to conditionally reference specific bit type (x86 or x64). The process has been explained in this thread http://stackoverflow.com/questions/145803/targeting-both-32bit-and-64bit-with-visual-studio-in-same-solution-project. Do it once for all the dll's that have specific bit version requirements and then you don't have to keep copying your project files as you develop your application. – Jatin May 16 '13 at 12:31

0 Answers0