-
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
It's not possible for a workload to set a default RuntimeIdentifier #18354
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
/cc @dsplaisted |
Another point is that it's not possible to rewrite code like this to have a condition on the RuntimeIdentifier (to only include the |
@rolfbjarne let's assume you get multiple RIDs working (not sure how close you are to that). Android defaults to |
Just merged the PR right now 😄
Yes, I thought about that, and actually tried it. I ran into problems with library projects, which wouldn't build correctly - iirc things got built twice, and some parts of the build got confused. It might have been something fairly simple to fix, but:
So I decided to try to set a default RuntimeIdentifier instead, and that turned out much easier to implement (except the fact that I had to set private variables too). |
I submitted #18639 for this |
Description
In Xamarin workloads, we'd like to set a default RuntimeIdentifier for each platform we support.
The problem is that the
Microsoft.NET.RuntimeIdentifierInference.targets
file is loaded before ourWorkloadManifest.targets
file, and executes some logic depending on whether the RuntimeIdentifier is set or not, which means that it's too late if we try to setRuntimeIdentifer
in our WorkloadManifest.targets file.And we can't set it earlier (
AutoImports.props
), because that would be a global default, not a platform-specific default.The workaround I've found is to replicate the behavior of
Microsoft.NET.RuntimeIdentifierInference.targets
that we want in ourWorkloadManifest.targets
, which comes down to something like this:Something more appropriate would be nice...
The text was updated successfully, but these errors were encountered: