From 4f0a8f2bd62aa0df980824bf26ac2b723fab160f Mon Sep 17 00:00:00 2001 From: JRahnama Date: Wed, 17 Jul 2024 22:47:38 -0700 Subject: [PATCH 1/4] Add Delay sign to ref csprojs --- .../steps/build-all-configurations-signed-dlls-step.yml | 7 ++++++- .../common/templates/steps/code-analyze-step.yml | 9 ++++++++- .../netcore/ref/Microsoft.Data.SqlClient.csproj | 8 ++++++++ .../netfx/ref/Microsoft.Data.SqlClient.csproj | 8 ++++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml index 24be776959..539eba0701 100644 --- a/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml +++ b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml @@ -36,7 +36,12 @@ steps: inputs: solution: '**/build.proj' configuration: '${{parameters.Configuration }}' - msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk' + msbuildArguments: >- + -p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} + -t:BuildAllConfigurations + -p:GenerateNuget=false + ${{ if eq(variables['CDP_BUILD_TYPE'], 'Official') }}: + -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk - ${{ if eq(parameters.product, 'AKV') }}: - task: MSBuild@1 diff --git a/eng/pipelines/common/templates/steps/code-analyze-step.yml b/eng/pipelines/common/templates/steps/code-analyze-step.yml index 55111a42fe..065713b796 100644 --- a/eng/pipelines/common/templates/steps/code-analyze-step.yml +++ b/eng/pipelines/common/templates/steps/code-analyze-step.yml @@ -34,7 +34,14 @@ steps: msBuildVersion: 17.0 msBuildArchitecture: x64 setupCommandlinePicker: vs2022 - msBuildCommandline: 'msbuild ${{parameters.sourceRoot}}\build.proj -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk' + msBuildCommandline: >- + msbuild ${{parameters.sourceRoot}}\build.proj + -p:configuration=Release + -p:GenerateNuget=false + -p:BuildTools=false + ${{ if eq(variables['CDP_BUILD_TYPE'], 'Official') }}: + -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk + - ${{ if eq(parameters.product, 'AKV') }}: - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Guardian Dotnet Analyzers ' diff --git a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj index ac2b2d98bf..2322015cac 100644 --- a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj @@ -10,6 +10,14 @@ netcoreapp AnyCPU;x64;x86 + + + true + true + $(SigningKeyPath) + $(SigningKeyPath) + + diff --git a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj index 9f01406cd2..d07863a300 100644 --- a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj @@ -8,6 +8,14 @@ Framework $(BaseProduct) Debug;Release; + + + true + true + $(SigningKeyPath) + $(SigningKeyPath) + + From 12775819f8dc2a34772a1ac82c2abb479dd46e33 Mon Sep 17 00:00:00 2001 From: JRahnama Date: Thu, 18 Jul 2024 14:21:43 -0700 Subject: [PATCH 2/4] commit --- .../steps/build-all-configurations-signed-dlls-step.yml | 1 - .../common/templates/steps/code-analyze-step.yml | 1 - .../netcore/ref/Microsoft.Data.SqlClient.csproj | 5 ++++- .../netcore/src/Microsoft.Data.SqlClient.csproj | 5 ++++- .../netfx/ref/Microsoft.Data.SqlClient.csproj | 8 +++++--- .../netfx/src/Microsoft.Data.SqlClient.csproj | 5 ++++- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml index 539eba0701..3fde305ebd 100644 --- a/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml +++ b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml @@ -40,7 +40,6 @@ steps: -p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false - ${{ if eq(variables['CDP_BUILD_TYPE'], 'Official') }}: -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk - ${{ if eq(parameters.product, 'AKV') }}: diff --git a/eng/pipelines/common/templates/steps/code-analyze-step.yml b/eng/pipelines/common/templates/steps/code-analyze-step.yml index 065713b796..13a720c379 100644 --- a/eng/pipelines/common/templates/steps/code-analyze-step.yml +++ b/eng/pipelines/common/templates/steps/code-analyze-step.yml @@ -39,7 +39,6 @@ steps: -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false - ${{ if eq(variables['CDP_BUILD_TYPE'], 'Official') }}: -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk - ${{ if eq(parameters.product, 'AKV') }}: diff --git a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj index 2322015cac..1de608a30d 100644 --- a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj @@ -11,12 +11,15 @@ AnyCPU;x64;x86 - + true true $(SigningKeyPath) $(SigningKeyPath) + + $(SigningKeyPath) + diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj index 3adc0617e8..cd158af33c 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -21,12 +21,15 @@ - + true true $(SigningKeyPath) $(SigningKeyPath) + + $(SigningKeyPath) + $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)')) diff --git a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj index d07863a300..89902ba507 100644 --- a/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj @@ -8,14 +8,16 @@ Framework $(BaseProduct) Debug;Release; - - + + true true $(SigningKeyPath) $(SigningKeyPath) - + + $(SigningKeyPath) + diff --git a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj index 1f8e643a45..70a3338a50 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -19,12 +19,15 @@ $(DefineConstants);NETFRAMEWORK; - + true true $(SigningKeyPath) $(SigningKeyPath) + + $(SigningKeyPath) + full From 66faa5050a14640cb82cae4fa00c31fc5c8ad6f4 Mon Sep 17 00:00:00 2001 From: JRahnama Date: Thu, 18 Jul 2024 14:42:23 -0700 Subject: [PATCH 3/4] reverting yaml changes --- .../steps/build-all-configurations-signed-dlls-step.yml | 6 +----- eng/pipelines/common/templates/steps/code-analyze-step.yml | 7 +------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml index 3fde305ebd..24be776959 100644 --- a/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml +++ b/eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml @@ -36,11 +36,7 @@ steps: inputs: solution: '**/build.proj' configuration: '${{parameters.Configuration }}' - msbuildArguments: >- - -p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} - -t:BuildAllConfigurations - -p:GenerateNuget=false - -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk + msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk' - ${{ if eq(parameters.product, 'AKV') }}: - task: MSBuild@1 diff --git a/eng/pipelines/common/templates/steps/code-analyze-step.yml b/eng/pipelines/common/templates/steps/code-analyze-step.yml index 13a720c379..1da1477285 100644 --- a/eng/pipelines/common/templates/steps/code-analyze-step.yml +++ b/eng/pipelines/common/templates/steps/code-analyze-step.yml @@ -34,12 +34,7 @@ steps: msBuildVersion: 17.0 msBuildArchitecture: x64 setupCommandlinePicker: vs2022 - msBuildCommandline: >- - msbuild ${{parameters.sourceRoot}}\build.proj - -p:configuration=Release - -p:GenerateNuget=false - -p:BuildTools=false - -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk + msBuildCommandline: 'msbuild ${{parameters.sourceRoot}}\build.proj -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk' - ${{ if eq(parameters.product, 'AKV') }}: - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 From 0eb41c11a667b60a27b01646cdc1506773ef3fa7 Mon Sep 17 00:00:00 2001 From: JRahnama Date: Thu, 18 Jul 2024 14:43:33 -0700 Subject: [PATCH 4/4] commit --- eng/pipelines/common/templates/steps/code-analyze-step.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/common/templates/steps/code-analyze-step.yml b/eng/pipelines/common/templates/steps/code-analyze-step.yml index 1da1477285..55111a42fe 100644 --- a/eng/pipelines/common/templates/steps/code-analyze-step.yml +++ b/eng/pipelines/common/templates/steps/code-analyze-step.yml @@ -35,7 +35,6 @@ steps: msBuildArchitecture: x64 setupCommandlinePicker: vs2022 msBuildCommandline: 'msbuild ${{parameters.sourceRoot}}\build.proj -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk' - - ${{ if eq(parameters.product, 'AKV') }}: - task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3 displayName: 'Guardian Dotnet Analyzers '