Skip to content

Commit b7b58e4

Browse files
committed
don't throw on RID-mismatch
1 parent 944555c commit b7b58e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cli/dotnet/ToolPackage/ToolPackageDownloaderBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ public bool TryGetDownloadedTool(
333333
var bestRuntimeIdentifier = Microsoft.NET.Build.Tasks.NuGetUtils.GetBestMatchingRid(runtimeGraph, RuntimeInformation.RuntimeIdentifier, toolConfiguration.RidSpecificPackages.Keys, out bool wasInGraph);
334334
if (bestRuntimeIdentifier == null)
335335
{
336-
throw new ToolPackageException(string.Format(CliStrings.ToolUnsupportedRuntimeIdentifier, RuntimeInformation.RuntimeIdentifier,
337-
string.Join(" ", toolConfiguration.RidSpecificPackages.Keys)));
336+
// no need to throw here - as long as we're packaging the main RID-agnostic package we can still work cross-platform.
337+
return;
338338
}
339339

340340
var resolvedPackage = toolConfiguration.RidSpecificPackages[bestRuntimeIdentifier];

0 commit comments

Comments
 (0)