Closed
Description
At present:
dotnet publish -c Release path/code -o path/app /p:PublishSingleFile=true
throws error:
error NETSDK1031: It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set SelfContained to false.
which requires a fix like:
dotnet publish -c Release path/code -o path/app /p:PublishSingleFile=true -r osx-x64
It is fairly a common usecase to publish an app for platform with same RID as host.
However, the error is good to keep it an explicit and conscious decision of user; instead of falling back to some default value.
Please add --use-current-rid
or --infer-rid
option for automation and documentation convenience.
This way user will still explicitly specify RID option, without supplying platform specific value.
Metadata
Metadata
Assignees
Labels
No labels