From cfd471131bed5d3a2109f05c01ecac95fdc0f6fc Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Fri, 19 Mar 2021 14:54:35 -0700 Subject: [PATCH] Fix the public key token in frameworkList I happened to be referencing this code and noticed it dropped leading 0s from bytes when formatting the public key token. For example `b03f5f7f11d5a3a` `b03f5f7f11d50a3a` --- .../src/CreateFrameworkListFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs b/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs index 8e46d1f9449..90bd96b13af 100644 --- a/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs +++ b/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs @@ -148,7 +148,7 @@ public override bool Execute() StringBuilder publicKeyTokenBuilder = new StringBuilder(len * 2); for (int i = 0; i < len; i++) { - publicKeyTokenBuilder.Append(publicKeyToken[i].ToString("x", CultureInfo.InvariantCulture)); + publicKeyTokenBuilder.Append(publicKeyToken[i].ToString("x2", CultureInfo.InvariantCulture)); } publicKeyTokenHex = publicKeyTokenBuilder.ToString(); }