-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet build/publish uses the implicit SDK RID for RID-specific apps by default #23539
Comments
What about dotnet publish -p:PublishReadyToRun=true and dotnet publish --self-contained=false -p:PublishReadyToRun=true Currently they must specify RID. |
|
This should use the portable rid, and not the rid the SDK/runtime was built for. .NET 6 SDK added an option for this called Adding the rid affects the restore behavior and causes more dependencies to be downloaded. Probably this is not desired. |
Just saw this. This doesn't ring true for me. There is no such option today, opt-in or otherwise, other than perhaps By definition, (as a user) you've already opted into a RID-specific scenario. This is just about getting a default RID instead of always being forced to specify one. Seems virtuous w/no downside to me. |
There is
By portable, I don't mean The SDK already stores this rid in the
#23545 is proposing: dotnet build/publish does not produce an exe/apphost for portable apps by default. So, if I understand correctly: |
Oh! I always forget this use of The implicit RID and the Right. This change would apply when you use |
Yeah,
So yes, I believe they should be identical. |
Right now we do this inference when We should set the RID for
Do folks know of other scenarios that would fit? Otherwise we'll keep spelunking the publish-y targets. If this list is too long/freeform we may want to consider a more extensible mechanism for opting in to this behavior. |
Ya. I was mentioning this to @agocke. We should do all those things. Add |
I don't think anything except SelfContained probably needs anything. If you have PublishAot in your project file, you don't want |
Oh my, did I just realize that we don't have a |
Is the goal to allow Publish to behave differently from build? |
No. This is agnostic to build/publish. It's whatever argument requires a RID can use the implicit one. Most of the cases for that are in |
I wrote a mini-spec for the |
I wrote a mini-spec on FDD + (implicit) RID-specific apps at #26031 |
This should be resolved in the release/7.0.1xx branch now. (#26143) I'd imagine it will flow into rc-2 within a week or two. Please let me know if you encounter any issues. Elsewise we can mark this as resolved! Thanks for working with us to improve the end user experience |
dotnet build/publish uses the implicit SDK RID for RID-specific apps by default
Proposal: .NET SDK uses the implicit Runtime Identifier (RID) in each case when a RID is required but isn't specified by the user. It should affect (at least) the following
dotnet
commands:build
publish
run
We should validate where
--self-contained
is supported/valid. Wherever it is valid, this behavior change should be made.Example: The following example (console app template) should not fail, but succeed (using the implicit SDK RID). This failure isn't useful (it doesn't protect the user from anything scary).
Note: Part of this feature was implemented in #22314.
The text was updated successfully, but these errors were encountered: