From d07a78532cb0e6ab43f58c93f657850f347157b1 Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Wed, 7 Nov 2018 16:35:27 -0800 Subject: [PATCH] Use `ProductMonikerRid` instead of `CoreSetupRid` for SDK RID. This commit changes `NETCoreSdkRuntimeIdentifier` to be based off of `ProductMonikerRid` instead of `CoreSetupRid`. `CoreSetupRid` is set to the host RID for the build, by default. For most architectures, this was fine. However, for ARM/ARM64 builds, we cross-build, so `CoreSetupRid` is actually x64 and not ARM/ARM64. As a result, the default apphost being used isn't built for ARM so `dotnet run` fails with an exec format error when trying to exec the apphost. Instead, we should be using the RID of the product being built rather than the host RID. Fixes dotnet/cli#10291. --- build/MSBuildExtensions.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/MSBuildExtensions.targets b/build/MSBuildExtensions.targets index 9de15905c..11a5e278d 100644 --- a/build/MSBuildExtensions.targets +++ b/build/MSBuildExtensions.targets @@ -135,7 +135,7 @@ Copyright (c) .NET Foundation. All rights reserved. $(_NETCorePlatformsPackageVersion) @(BundledVersionsVariable->'<%(Identity)>%(Value)', '%0A ') $(SdkVersion) - $(CoreSetupRid) + $(ProductMonikerRid) <_NETCoreSdkIsPreview>$(_NETCoreSdkIsPreview) %24(_NETCoreSdkIsPreview)