dotnet / dotnet/sdk

The SDK should issue a build warning when building a macOS app that likely won't run

Open
#51,432 0 comments 1 reaction 1 assignee Assigned to @Copilot View on GitHub
Area-MacOS Area-NetSDK good first issue 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.

On macOS, applications ending in `.App` or `.Service` just....don't work with `dotnet run`. The SDK should give users a heads-up so that we can 'shift-left' this user foot-gun.

### Describe the solution you'd like
The SDK should add a new diagnostic (level=warning) that is fired when a project with an OutputType of Exe is
* built at all when the SDK's 'implicit RuntimeIdentifier' is a macOS RID, and/or
* whenever such a project is built with a RID that is a macOS RID

### Additional context

This bites users somewhat frequently (I've hit it in the past) and is difficult to solve when it does pop up: https://github.com/dotnet/runtime/issues/120935

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.