-
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
Use implicit RID for Publish
Properties
#26028
Comments
publish
Property ChangesPublish
Properties
We should do this! The RuntimeInference part especially should be pushed down into the RuntimeInference targets and removed from the CLI's handling - right now the CLI can sometimes implicitly assign the RID via the RuntimeIdentifier property based on user gestures (see #25062 for an example of this) and this mismatch between the CLI and the targets leads to unclear ordering. |
I was thinking about That guidance suggests setting After talking to @bradygaster, I learned that there were some scenarios that would benefit to dotnet publish -c Release --use-current-runtime --self-contained false That forced set of settings would be necessary to coerce a project into "Brady mode" if it was configured like this: <PropertyGroup>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
</PropertyGroup> The key point here is whether Here are some choices:
If we go with the first one, then it seems like we need to keep If we go with the first one, the property would basically be Anyone have a preference for which of these we should go with? |
We haven't forgotten this proposal! There have been some brief discussions on which choice, but nothing confirmed yet. I think some folks will reach out to discuss this with you offline when there's bandwidth. I'm lacking experience to give a good enough final answer. But I lean towards |
I also lean towards We'd need to decide what I'm trying to remember the case where A project file has this: <RuntimeIdentifier>linux-x64</RuntimeIdentifier> Whether it also specified Via the CLI, you want to override that to Ideally, we could have a shorter alias for that like Thinking more about this, <SelfContained>false</SelfContained>
<RuntimeIdentifier>$CurrentRuntime</RuntimeIdentifier> That means if you specify Good? |
That sounds good. Big love for simplifying the docker files. Though I'm confused with how this aligns with the other proposals. See the two questions below please, it'll help me understand the next steps. For #23539It seems the point of #23539 Had me thinking we were going to do that automatically when the 4 related options are provided ( Are we doing both? Or are we not going to do that now, and instead make it only the property For #26028: (This Proposal)What is the difference between So TLDR In addition, we don't deprecate |
You raise some good points/questions. I'll try to address them. I'm no an expert on MSBuild or on its interactions with the CLI. I'll just described what I see as reasonable UX from a user standpoint. ScenariosLet's look at the scenarios (that at least I have in mind). I want an FDD+RID-specific app all the timeGiven: Project file includes
Note: The implicit RID should always be a portable one, like I want to take a
|
I'd find it helpful if the "implicit" RID had more detail/depth. For a given platform there is often a "general purpose" and "specific" RID available. As an example, on Windows there is both "Current runtime" might be construed as the most specific rather than as the "most portable" and likewise "most portable" may sometimes be undesirable or incorrect depending on the application or scenario. |
That does answer all of the questions, thanks for taking the time to respond and clarify. |
My understanding is that "current runtime" is always/already a portable one and I added a note in my mini spec above. Thanks for calling this out. @tmds also thanks you. |
We believe everything but publish self contained is complete here and that is tracked by other issues |
Use implicit RID for
Publish
PropertiesBased on #23539, we have the opportunities to make additional improvements fit-and-finish improvements. The referenced change enables an implicit RID to be used when a RID is needed, specifically via the CLI like with
--self-contained
. There several properties where that is equally valuable.We should extend the same change to:
SelfContained
PublishAot
PublishReadyToRun
PublishSingleFile
PublishTrimmed
These proposed changes make it obvious that we're missing
PublishSelfContained
as an option. It's odd that this has never come up. It would enable producing self contained apps, but only for thepublish
verb, just like the otherPublish*
properties.We should add:
PublishSelfContained
In retrospect, I've struggled with the lack of
PublishSelfContained
, but it never occurred to me that we could have such a straightforward and symmetric solution to solve that.--use-current-runtime
The new implicit RID feature replaces
--use-current-runtime
. The following two lines are now equivalent.We should deprecate (and undocument)
--use-current-runtime
going foward. It no longer has a purpose.@baronfel @agocke @nagilson @marcpopMSFT
The text was updated successfully, but these errors were encountered: