dotnet / dotnet/msbuild

How to build more than one platform target?

Open
#8,097 3 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 6h
Merged PRs (30d)
139

Description

Hi,

As a company, we have recently introduced an Arm64 version of our .NET 6-based product, and now we're building both Arm64 and x64 versions of it and deploy one or the other (depending on a machine) using a single installer.

To make it work, we had to introduce an MSBuild property to switch between platforms, and then build the project twice, output the result into a separate directory and remove all AnyCPU dependencies in a script.

I would like to ask, is there a better way to do this? I particularly dislike the part with the "cleanup" of duplicated dependencies. Is there a good way to build two platform-dependent EXEs (with different names) for one project, reusing the dependencies? Preferably in a single build.

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.