0

Is it possible to build a project for 2 platforms using a single command?

I have a solution with 2 active platforms i need to build each project for both platforms.

Solution containing both C++ & C#

All project have different output folder per active platform

Is it possible?

Do i need to add a post build event and rerun the compilation?

Active Platforms

galsi
  • 421
  • 1
  • 6
  • 19
  • I think you can use `Batch Build` button in VS IDE to build different projects with different platforms, configurations,etc.. at the same time. – Mr Qian May 27 '20 at 03:01

1 Answers1

1

Is it possible to build a project for 2 platforms using a single command?

It can be done in Visual Studio.

1) In VS IDE,

there is an option called Batch Build which can build different projects with different platforms,..etc at the same time.

Build-->Batch Build or right-click your solution-->Batch Build

enter image description here

You can choose any platforms for your project to build them.

2) If you want to use MSBuild command line,

You can create a proj called test.proj file which assembles the association between the project and the platform.

Then build test.proj in msbuild command line directly.

You can check my answer in a similar issue.

In my answer, BuildInParallel="true" can build all projects in parallel, which can improve the performance of msbuild build.

Mr Qian
  • 21,064
  • 1
  • 31
  • 41
  • I did not know about such option , testing it today , we have about 720 projects and 130 have dual configurations - currently i get many issues of rebuild – galsi May 27 '20 at 09:27