views:

86

answers:

2

Greetings all,

I'm working with a C# solution in VS 2010. Right now, since I'm targeting AnyCPU, when I want to build my installer, I can just select Release mode and hit build and everything is done for me. However, pretty soon I'm going to have to add a C++ DLL project to the solution to accomplish some low-level stuff. To avoid having two different download links for x86 and x64, I'd like to include both builds in my installer. But, it will be very annoying if I have to have separate configurations for x86 and x64. I'll have to build one, then the other, then package it up. Is there some way I can get Visual Studio to compile both the x86 and x64 builds of the C++ project as part of Release mode?

A: 

I think that you will have to manually edit the proj files to ensure that the msbuild instructions are correct. I suspect it's not a hard job.

Preet Sangha
I've tried editing the solution file's `GlobalSection(ProjectConfigurationPlatforms) = postSolution` section; this doesn't work. It just compiles the first configuration listed and ignores any subsequent listings.
Paul Accisano
+1  A: 

Well, I found a solution. Just make two projects, one for x86 build and one for x64 build, referencing the same source files. It's ugly, but it works.

Paul Accisano