Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context: #36047
Context: dotnet/android#10062

We have experimental support for CoreCLR+R2R on Android. Android is also unique in that a default build can target multiple RIDs via:

<RuntimeIdentifiers>android-arm;android-arm64;android-x86;android-x64</RuntimeIdentifiers>

Unfortunately, targeting 4 RIDs like this results in:

dotnet/sdk/10.0.100-preview.4.25180.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(219,5):
error NETSDK1191: A runtime identifier for the property 'PublishReadyToRun' couldn't be inferred. Specify a rid explicitly

But simply skipping this error message allows the build to succeed, and R2R successfully runs on all 4 RIDs.

Just like in #36047, I introduced a new $(AllowReadyToRunWithoutRuntimeIdentifier) property to opt out of this error message.

I also added $(AllowPublishSingleFileWithoutRuntimeIdentifier), to give the same flexibility in the future.

…sage

Context: dotnet@d21e6bf
Context: dotnet/android#10062

We have experimental support for CoreCLR+R2R on Android. Android is
also unique in that a default build can target multiple RIDs via:

    <RuntimeIdentifiers>android-arm;android-arm64;android-x86;android-x64</RuntimeIdentifiers>

Unfortunately, targeting 4 RIDs like this results in:

    dotnet/sdk/10.0.100-preview.4.25180.3/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(219,5):
    error NETSDK1191: A runtime identifier for the property 'PublishReadyToRun' couldn't be inferred. Specify a rid explicitly

But simply skipping this error message allows the build to succeed, and
R2R successfully runs on all 4 RIDs.

Just like in d21e6bf, I introduced a new
`$(AllowReadyToRunWithoutRuntimeIdentifier)` property to opt out of
this error message.

I also added `$(AllowPublishSingleFileWithoutRuntimeIdentifier)`, to
give the same flexibility in the future.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets: Language not supported

@ghost ghost added Area-External untriaged Request triage from a team member labels Apr 22, 2025
@jonathanpeppers jonathanpeppers merged commit 5c9fe7d into dotnet:main Apr 22, 2025
42 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/android-r2r branch April 22, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-External untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants