-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Prefer the portable ILCompiler when publishing for the portable RID on a source-built SDK. #41754
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
Conversation
…n a source-built SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I defer to @dsplaisted who is the ProcessFrameworkReferences
expert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is reasonable to me as well. @tmds where would be the best place to test this? dotnet/source-build
?
I recently learned about https://github.com/dotnet/scenario-tests. We have our own test but only run it (late) on releases (including preview releases) since we know Microsoft will have published the portable ILCompiler package to nuget.org for those. |
@baronfel is there still time to get this into preview6? |
It's looking like a 'no' unless we can get Daniel to take a look at this today, after talking to the build team. |
It seems to me like this type of logic should be in .targets files, and it should set an MSBuild property for the RuntimeIdentifier to use. Maybe However, if there's still time to get it in preview 6, I'm OK with this change for now. |
I considered this. If we do this, as you say, it makes sense to apply it everywhere, and based on that I had opted to write this PR with a "localized" change instead. I will look into this.
I think we missed the deadline. I had preferred for this to be in preview 6, but I don't consider it a blocker. |
@dsplaisted if we set |
What if the EDIT: Basically IIUC, the default |
The issue we're trying to fix is that for |
@@ -778,9 +780,12 @@ enum ToolPackSupport | |||
var packNamePattern = knownPack.GetMetadata(packName + "PackNamePattern"); | |||
var packSupportedRuntimeIdentifiers = knownPack.GetMetadata(packName + "RuntimeIdentifiers").Split(';'); | |||
|
|||
// When publishing for the RuntimeIdentifier that matches NETCoreSdkPortableRuntimeIdentifier, prefer NETCoreSdkPortableRuntimeIdentifier for the host. | |||
// This makes us use a portable ILCompiler when publishing for a portable RID on a non-portable SDK. | |||
string hostRuntimeIdentifier = RuntimeIdentifier == NETCoreSdkPortableRuntimeIdentifier ? NETCoreSdkPortableRuntimeIdentifier : NETCoreSdkRuntimeIdentifier; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsplaisted I re-wrote this in a way it could be moved into the .targets
file.
NETCoreSdkRuntimeIdentifier
would be passed what hostRuntimeIdentifier
is set to.
Do you want me to move it to the .targets
file, or keep it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine here for now. It seems to me like we might eventually need to know which host Runtime Identifier we're using elsewhere. But until we run into a case like that I think it's good as is.
Fixes #41727.
cc @omajid @am11 @dsplaisted @baronfel @jkotas @ViktorHofer