Skip to content

Commit

Permalink
Fixed signing of assemblies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Haplois committed Apr 21, 2021
1 parent 8950e74 commit 8a8fd6b
Showing 1 changed file with 75 additions and 57 deletions.
132 changes: 75 additions & 57 deletions src/package/sign/sign.proj
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
<!-- Directory with .NET binaries -->
<ArtifactsDirectory Condition="'$(ArtifactsDirectory)' == ''">$(ArtifactsBaseDirectory)$(TargetFramework)\$(TargetRuntime)\</ArtifactsDirectory>

<!-- Directory with .NETCore binaries -->
<ArtifactsCoreDirectory Condition="'$(ArtifactsCoreDirectory)' == ''">$(ArtifactsBaseDirectory)netcoreapp2.1\</ArtifactsCoreDirectory>
<!-- Directory with netcoreapp2.1 binaries -->
<ArtifactsCore21Directory Condition="'$(ArtifactsCore21Directory)' == ''">$(ArtifactsBaseDirectory)netcoreapp2.1\</ArtifactsCore21Directory>

<!-- Directory with netcoreapp1.0 binaries -->
<ArtifactsCore10Directory Condition="'$(ArtifactsCore10Directory)' == ''">$(ArtifactsBaseDirectory)netcoreapp1.0\</ArtifactsCore10Directory>

<!-- Directory with NetStandard1.0 binaries -->
<ArtifactsNS10Directory Condition="'$(ArtifactsNS10Directory)' == ''">$(ArtifactsBaseDirectory)netstandard1.0\</ArtifactsNS10Directory>
Expand Down Expand Up @@ -128,7 +131,6 @@
<AssembliesToSign Include="$(ArtifactsDirectory)Microsoft.VisualStudio.QualityTools.DataCollectionAgentObject.dll" />
<AssembliesToSign Include="$(ArtifactsDirectory)Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter.dll" />
<AssembliesToSign Include="$(ArtifactsDirectory)Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAgent.dll" />
<AssembliesToSign Include="$(ArtifactsDirectory)VsWebSite.Interop.dll" />
<AssembliesToSign Include="$(ArtifactsDirectory)QTAgent.exe" />
<AssembliesToSign Include="$(ArtifactsDirectory)QTAgent32.exe" />
<AssembliesToSign Include="$(ArtifactsDirectory)QTAgent32_35.exe" />
Expand All @@ -149,7 +151,6 @@
<!--These dlls are already signed from VS nuget feed
<AssembliesToSign Include="$(ArtifactsDirectory)Microsoft.VisualStudio.Diagnostics.Measurement.dll" />
<AssembliesToSign Include="$(ArtifactsDirectory)Microsoft.VisualStudio.QualityTools.Sqm.dll" />
<AssembliesToSign Include="$(ArtifactsDirectory)Microsoft.VisualStudio.OLE.Interop.dll" />
-->

<!-- These are already signed, trying to sign them again causes warnings in the build pipeline.
Expand Down Expand Up @@ -302,46 +303,51 @@
<!-- <IntellitraceAssembliesToSign Include="$(ArtifactsBaseDirectory)Intellitrace\Team Tools\Dynamic Code Coverage Tools\amd64\msdia140.dll" /> -->
<!-- <IntellitraceAssembliesToSign Include="$(ArtifactsBaseDirectory)Intellitrace\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe" /> -->
<!-- <IntellitraceAssembliesToSign Include="$(ArtifactsBaseDirectory)Intellitrace\Team Tools\Dynamic Code Coverage Tools\amd64\CodeCoverage.exe" /> -->

<!-- Sign test platform v2 assemblies for .NET Core -->
<ItemGroup>
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)DataCollector.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.TestPlatform.CommunicationUtilities.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.TestPlatform.CoreUtilities.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.TestPlatform.PlatformAbstractions.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.TestPlatform.CrossPlatEngine.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.TestPlatform.Utilities.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.TestPlatform.VsTestConsole.TranslationLayer.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.VisualStudio.TestPlatform.Client.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.VisualStudio.TestPlatform.Common.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)vstest.console.dll" />

<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Microsoft.TestPlatform.CommunicationUtilities.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Microsoft.TestPlatform.CoreUtilities.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Microsoft.TestPlatform.CrossPlatEngine.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Microsoft.TestPlatform.PlatformAbstractions.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Microsoft.TestPlatform.Utilities.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Microsoft.VisualStudio.TestPlatform.Common.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net452.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net452.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net46.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net46.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net461.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net461.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net462.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net462.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net47.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net47.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net471.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net471.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net472.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net472.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net48.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\testhost.net48.x86.exe" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\datacollector.exe" />
<Core10AssembliesToSign Include="$(ArtifactsCore10Directory)Microsoft.TestPlatform.CoreUtilities.dll" />
<Core10AssembliesToSign Include="$(ArtifactsCore10Directory)Microsoft.TestPlatform.PlatformAbstractions.dll" />
<Core10AssembliesToSign Include="$(ArtifactsCore10Directory)Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" />

<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)DataCollector.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.TestPlatform.CommunicationUtilities.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.TestPlatform.CoreUtilities.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.TestPlatform.PlatformAbstractions.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.TestPlatform.CrossPlatEngine.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.TestPlatform.Utilities.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.TestPlatform.VsTestConsole.TranslationLayer.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.VisualStudio.TestPlatform.Client.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.VisualStudio.TestPlatform.Common.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)vstest.console.dll" />

<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Microsoft.TestPlatform.CommunicationUtilities.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Microsoft.TestPlatform.CoreUtilities.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Microsoft.TestPlatform.CrossPlatEngine.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Microsoft.TestPlatform.PlatformAbstractions.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Microsoft.TestPlatform.Utilities.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Microsoft.VisualStudio.TestPlatform.Common.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net452.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net452.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net46.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net46.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net461.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net461.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net462.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net462.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net47.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net47.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net471.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net471.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net472.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net472.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net48.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\testhost.net48.x86.exe" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\datacollector.exe" />

<NetStandard10AssembliesToSign Include="$(ArtifactsNS10Directory)Microsoft.TestPlatform.CoreUtilities.dll" />
<NetStandard10AssembliesToSign Include="$(ArtifactsNS10Directory)Microsoft.TestPlatform.PlatformAbstractions.dll" />
Expand All @@ -360,24 +366,25 @@
<UAP100AssembliesToSign Include="$(ArtifactsUAP100Directory)Microsoft.TestPlatform.AdapterUtilities.dll" />

<!-- NetCoreExtensions -->
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Extensions\Microsoft.TestPlatform.TestHostRuntimeProvider.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Extensions\Microsoft.TestPlatform.Extensions.BlameDataCollector.dll" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Extensions\Microsoft.TestPlatform.Extensions.EventLogCollector.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Extensions\Microsoft.TestPlatform.TestHostRuntimeProvider.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Extensions\Microsoft.TestPlatform.Extensions.BlameDataCollector.dll" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Extensions\Microsoft.TestPlatform.Extensions.EventLogCollector.dll" />

<!-- Localized resources -->
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)%(ResxLang.Identity)\*.*" />
<Core10AssembliesToSign Include="$(ArtifactsCore10Directory)%(ResxLang.Identity)\*.*" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)%(ResxLang.Identity)\*.*" />
<NetStandard10AssembliesToSign Include="$(ArtifactsNS10Directory)%(ResxLang.Identity)\*.*" />
<NetStandard13AssembliesToSign Include="$(ArtifactsNS13Directory)%(ResxLang.Identity)\*.*" />
<NetStandard20AssembliesToSign Include="$(ArtifactsNS20Directory)%(ResxLang.Identity)\*.*" />
<UAP100AssembliesToSign Include="$(ArtifactsUAP100Directory)%(ResxLang.Identity)\*.*" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)Extensions\%(ResxLang.Identity)\*.*" />
<CoreAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\%(ResxLang.Identity)\*.*" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)Extensions\%(ResxLang.Identity)\*.*" />
<Core21AssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\%(ResxLang.Identity)\*.*" />

<!-- Third Party assemblies to sign -->
<ThirdPartyAssembliesToSign Include="$(ArtifactsCoreDirectory)Newtonsoft.Json.dll" />
<ThirdPartyAssembliesToSign Include="$(ArtifactsCoreDirectory)TestHost\Newtonsoft.Json.dll" />
<ThirdPartyAssembliesToSign Include="$(ArtifactsCore21Directory)Newtonsoft.Json.dll" />
<ThirdPartyAssembliesToSign Include="$(ArtifactsCore21Directory)TestHost\Newtonsoft.Json.dll" />
</ItemGroup>

<!-- Sign Microsoft.TestPlatform.Build -->
Expand Down Expand Up @@ -497,10 +504,15 @@
<StrongName>StrongName</StrongName>
</Fw45AssembliesToSign>

<CoreAssembliesToSign>
<Core21AssembliesToSign>
<Authenticode>Microsoft400</Authenticode>
<StrongName>StrongName</StrongName>
</CoreAssembliesToSign>
</Core21AssembliesToSign>

<Core10AssembliesToSign>
<Authenticode>Microsoft400</Authenticode>
<StrongName>StrongName</StrongName>
</Core10AssembliesToSign>

<BuildAssembliesToSign>
<Authenticode>Microsoft400</Authenticode>
Expand Down Expand Up @@ -571,9 +583,15 @@
IntermediatesDirectory="$(IntermediatesDirectory)"
Type="$(SignType)" />

<Message Text="Signing using authenticode certificate CoreAssembliesToSign:'%(CoreAssembliesToSign.Authenticode)' for @(CoreAssembliesToSign)"/>
<SignFiles Files="@(CoreAssembliesToSign)"
BinariesDirectory="$(ArtifactsCoreDirectory)"
<Message Text="Signing using authenticode certificate Core21AssembliesToSign:'%(Core21AssembliesToSign.Authenticode)' for @(Core21AssembliesToSign)"/>
<SignFiles Files="@(Core21AssembliesToSign)"
BinariesDirectory="$(ArtifactsCore21Directory)"
IntermediatesDirectory="$(IntermediatesDirectory)"
Type="$(SignType)" />

<Message Text="Signing using authenticode certificate Core10AssembliesToSign:'%(Core10AssembliesToSign.Authenticode)' for @(Core10AssembliesToSign)"/>
<SignFiles Files="@(Core10AssembliesToSign)"
BinariesDirectory="$(ArtifactsCore10Directory)"
IntermediatesDirectory="$(IntermediatesDirectory)"
Type="$(SignType)" />

Expand Down

0 comments on commit 8a8fd6b

Please sign in to comment.