dotnet / dotnet/sdk

Is it possible to get dotnet build to produce a Windows and a Linux executable?

Open
#43,317 2 comments 1 reaction 1 assignee Claimed by @dsplaisted View on GitHub
Area-CLI PublishVsBuild untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Is your feature request related to a problem? Please describe.

`dotnet build` on Windows for an executable project will produce a `.dll` and a runnable `.exe` file
`dotnet build` on GNU+Linux for an executable project will produce a `.dll` and a runnable ELF file

There does not seem to be a way to do both.

### Describe the solution you'd like

In our CI/CD build, we would like to produce both the EXE and ELF file. This would make our package runnable on both OS.
Can we have an option to produce both the EXE and ELF file?
Something like: `dotnet build --exe-and-elf`

### Additional context

I found this post for the same request: [SO Is it possible to get dotnet to produce a Windows and a Linux executable?](https://stackoverflow.com/questions/70890984/is-it-possible-to-get-dotnet-to-produce-a-windows-and-a-linux-executable)]

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.