Skip to content
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

Introduce PublishRuntimeIdentifier #28717

Merged
merged 21 commits into from
Nov 4, 2022

Conversation

nagilson
Copy link
Member

@nagilson nagilson commented Oct 21, 2022

Changes Examples

dotnet publish --use-current-runtime -p:PublishRuntimeIdentifier=tizen will publish with tizen, not the ucr.
dotnet publish --self-contained -p:PublishRuntimeIdentifier=win-x86 will publish with rid: win-x86
dotnet publish -p:PublishRuntimeIdentifier=win-x86 will publish with win-x86 rid.

In a project file:

<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishRuntimeIdentifier>win-x64</PublishRuntimeIdentifier>

dotnet build -> win-x86 rid.
dotnet publish -> win-x64 rid.

dotnet publish -r win-x86 /p:PublishRuntimeIdentifier=tizen will get rid: win-x86. Not ideal, we can do it the other way but it will have potentially far-reaching consequences.
dotnet publish --property:RuntimeIdentifier=win-x86 /p:PublishRuntimeIdentifier=tizen: gives win-x86 rid.

Summary

  • PublishRuntimeIdentifier will override RuntimeIdentifier when publishing unless it is global, like passed in with dotnet publish --r RID /p:PulishRuntimeIdentifier=RID_2
  • PublishRuntimeIdentifier will override the RID if UCR is used.
  • Same thing where it doesn't work with t:/Publish but we plan to make it work in VS Publish outside of this PR.

The rest is pretty self explanatory...

@nagilson nagilson marked this pull request as ready for review October 25, 2022 22:03
@nagilson nagilson requested review from a team and richlander October 25, 2022 22:03
@build-analysis build-analysis bot mentioned this pull request Oct 26, 2022
2 tasks
@nagilson
Copy link
Member Author

@dsplaisted PTAL when you're free

@nagilson nagilson changed the base branch from release/7.0.1xx to release/7.0.2xx November 2, 2022 17:13
@nagilson nagilson changed the base branch from release/7.0.2xx to release/7.0.1xx November 2, 2022 17:16
@nagilson nagilson force-pushed the nagilson-publish-rid branch from 438d643 to 36c3bc6 Compare November 2, 2022 18:28
@nagilson nagilson requested review from ericstj, a team and joperezr as code owners November 2, 2022 18:28
@nagilson nagilson changed the base branch from release/7.0.1xx to release/7.0.2xx November 2, 2022 18:28
@nagilson nagilson removed request for a team November 2, 2022 18:28
@nagilson
Copy link
Member Author

nagilson commented Nov 2, 2022

/azp run (GH is bugged due to rebase)

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@nagilson
Copy link
Member Author

nagilson commented Nov 2, 2022

@dsplaisted PTAL. I've made all of the requested changes and a few others where the same comment applied to other parts. Let's merge this and then use this testProject change in the PublishSelfContained PR.

@nagilson
Copy link
Member Author

nagilson commented Nov 3, 2022

@dsplaisted Thanks for taking a look, I appreciate your time. I added some comments in the test code. As incorrect comments can be quite insidious, lmk if you see anything wrong.

@nagilson nagilson enabled auto-merge November 3, 2022 21:30
… anyways

Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
@nagilson nagilson merged commit a990f3a into dotnet:release/7.0.2xx Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants