Compare commits

...

4 Commits

Author SHA1 Message Date
Dustin L. Howett
f53f793fcf NOBODY IS USING THIS 2025-05-15 14:10:57 -05:00
Dustin L. Howett
876204a50b Maybe strong naming revealed this 2025-05-15 13:12:27 -05:00
Dustin L. Howett
aec50992ef make it work 2025-05-15 13:09:30 -05:00
Dustin L. Howett
5cd235b303 build: strong name sign the Extension Toolkit
Strong-name signing embeds publisher identity into the signature of a
.NET assembly.

This is required if *any other* strong name signed project wants to take
a dependency on it.

To make this work, we need to delay-sign it with a public key (.snk
file)--e.g. say we are going to sign it, but not actually sign it--to
give it an identity and then later submit it to ESRP for final signing.

The snk file does not contain any private material.
2025-05-15 12:28:40 -05:00
8 changed files with 70 additions and 6 deletions

View File

@@ -1535,6 +1535,7 @@ SMALLICON
smartphone
SMTO
SNAPPROCESS
snk
snwprintf
softline
SOURCECLIENTAREAONLY

Binary file not shown.

View File

@@ -4,9 +4,66 @@
"SignBatches": [
{
"MatchedPath": [
"Microsoft.CommandPalette.Extensions.dll",
"Microsoft.CommandPalette.Extensions.Toolkit.dll"
],
"SigningInfo": {
"Operations": [
{
"KeyCode": "CP-233904-SN",
"OperationSetCode": "StrongNameSign",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": []
},
{
"KeyCode": "CP-233904-SN",
"OperationSetCode": "StrongNameVerify",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": []
},
{
"KeyCode": "CP-230012",
"OperationSetCode": "SigntoolSign",
"Parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd \"SHA256\""
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationSetCode": "SigntoolVerify",
"Parameters": [],
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
}
},
{
"MatchedPath": [
"Microsoft.CommandPalette.Extensions.dll"
],
"SigningInfo": {
"Operations": [
{

View File

@@ -16,6 +16,6 @@ namespace Microsoft.CommandPalette.Extensions.Toolkit;
[JsonSerializable(typeof(List<ChoiceSetSetting>))]
[JsonSerializable(typeof(Dictionary<string, object>), TypeInfoPropertyName = "Dictionary")]
[JsonSourceGenerationOptions(UseStringEnumConverter = true, WriteIndented = true)]
internal partial class JsonSerializationContext : JsonSerializerContext
internal sealed partial class JsonSerializationContext : JsonSerializerContext
{
}

View File

@@ -5,8 +5,6 @@
using System;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Plugin.Program.UnitTests")]
namespace Microsoft.CommandPalette.Extensions.Toolkit;
public partial class MatchOption

View File

@@ -4,8 +4,6 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Microsoft.Plugin.Program.UnitTests")]
namespace Microsoft.CommandPalette.Extensions.Toolkit;
public partial class MatchResult

View File

@@ -15,6 +15,12 @@
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
<PropertyGroup Condition="'$(CIBuild)'=='true'">
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\..\..\..\..\.pipelines\272MSSharedLibSN2048.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<CsWinRTIncludes>Microsoft.CommandPalette.Extensions</CsWinRTIncludes>
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>

View File

@@ -69,6 +69,10 @@ if (($BuildStep -ieq "all") -Or ($BuildStep -ieq "build")) {
("/p:VersionNumber="+$VersionOfSDK)
)
if ($IsAzurePipelineBuild) {
$msbuildArgs += "/p:CIBuild=true"
}
& $msbuildPath $msbuildArgs
}
}