Steven Wood
Steven Wood

Reputation: 2775

Build both 32 and 64 bit at the same time using Visual Studio

I have an application that works really well in 64 bit architectures, but not quite so well in 32 bit architectures. However, we want to be able to support both architectures.

I am aware of the "Any CPU" option, but we actually want two versions of the software that are explicitly 32 or 64 bit.

I can set the properties to 32 bit, build it, copy the files out of the bin/debug folder and then repeat with 64 bit, but this is a real bore every time we build the application and have to send out both versions to QA.

Is there a way that we can get Visual Studio to automatically build both 32 and 64 bit into two separate folders?

Upvotes: 3

Views: 7507

Answers (3)

Dark Knight
Dark Knight

Reputation: 3577

You can use the BuildBatch Build option of Visual Studio:

Enter image description here

Upvotes: 9

Andrey Korneyev
Andrey Korneyev

Reputation: 26846

You can create two independent solution configurations, say x86 and x64, and set different output path and platform target for each configuration.

So you will need to select the first configuration, build the solution, select the second, and build again.

Or you can use batch build with both configurations checked.

Upvotes: 0

user743382
user743382

Reputation:

It's not exactly "at the same time", but you can simply create separate 32-bit and 64-bit solution configurations, and build the solution in both configurations, either from Visual Studio or from the command prompt (with msbuild /p:Configuration=<config name>). The generated executables will be placed in a configuration-specific directory, so the second build won't overwrite the first.

Upvotes: 0

Related Questions