Skip to content

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

@baronfel

Description

@baronfel

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: dotnet/runtime#120935

Metadata

Metadata

Assignees

Labels

Area-MacOSArea-NetSDKgood first issueIssues that would be a good fit for someone new to the repository. Narrow in scope, well-defined.untriagedRequest triage from a team member

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions