Compile both x86 and x64 in one configuration?

Greetings to all

I am working with a C # solution in VS 2010. Right now, since I am targeting AnyCPU, when I want to build my installer, I can just select the release mode and create the assembly, and everything is done for me. However, pretty soon I will have to add the C ++ DLL project to the solution to execute some low-level materials. In order not to have two different download links for x86 and x64, I would like to include both assemblies in my installer. But it will be very unpleasant if I have to have separate configurations for x86 and x64. I will have to build one, then another, and then pack it. Is there a way to get Visual Studio to compile the x86 and x64 builds of a C ++ project as part of Release mode?

+7
64bit visual-studio visual-studio-2010
source share
3 answers

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

+2
source share

I think you will have to manually edit proj files to make sure msbuild instructions are correct. I suspect this is not hard work.

0
source share

Just add an executable command to create such a configuration in the PostBuild event of the C ++ DLL project. Use macros and help "devenv /?".

AFAIR, for example:

devenv $(SolutionName) /project $(ProjectName) /ProjectConfig "Release|x64" 
0
source share

All Articles