From c5ba9c9411a4173e05aad3b9e1f61836f9ddb827 Mon Sep 17 00:00:00 2001 From: JRahnama Date: Mon, 8 Jul 2024 12:34:20 -0700 Subject: [PATCH 1/4] Adding delay sign to csprojs --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 7 +++++++ .../netfx/src/Microsoft.Data.SqlClient.csproj | 7 +++++++ 2 files changed, 14 insertions(+) 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 f0edc3c87c..0bf1bb6db8 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -20,6 +20,13 @@ $(NoWarn);IL2026;IL2057;IL2072;IL2075 + + + true + true + $(SigningKeyPath) + $(SigningKeyPath) + $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)')) 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 dcabe49ff8..5d288fd2b0 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -18,6 +18,13 @@ false $(DefineConstants);NETFRAMEWORK; + + + true + true + $(SigningKeyPath) + $(SigningKeyPath) + full From 5334f15d4a995392174ac207a3790b1859cb8b7c Mon Sep 17 00:00:00 2001 From: JRahnama Date: Mon, 8 Jul 2024 12:41:19 -0700 Subject: [PATCH 2/4] changing yaml to take argument for delay signed --- .../steps/build-all-configurations-signed-dlls-step.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5be79793fd..cac036f112 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,7 @@ steps: inputs: solution: '**/build.proj' configuration: '${{parameters.Configuration }}' - msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SignAssembly=true -p:AssemblyOriginatorKeyFile=$(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 From 382f1713d774d0276e1da0fdc671b717f69f06ab Mon Sep 17 00:00:00 2001 From: JRahnama Date: Tue, 9 Jul 2024 15:11:08 -0700 Subject: [PATCH 3/4] Modify Condition in csprojs --- eng/pipelines/common/templates/steps/code-analyze-step.yml | 2 +- .../netcore/src/Microsoft.Data.SqlClient.csproj | 2 +- .../netfx/src/Microsoft.Data.SqlClient.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/templates/steps/code-analyze-step.yml b/eng/pipelines/common/templates/steps/code-analyze-step.yml index 92be8eabf6..55111a42fe 100644 --- a/eng/pipelines/common/templates/steps/code-analyze-step.yml +++ b/eng/pipelines/common/templates/steps/code-analyze-step.yml @@ -34,7 +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' + 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 ' 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 0bf1bb6db8..a2406f9649 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -21,7 +21,7 @@ - + true true $(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 5d288fd2b0..c5e7a10e5e 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -19,7 +19,7 @@ $(DefineConstants);NETFRAMEWORK; - + true true $(SigningKeyPath) From 9a177a7fef43cd7ef10270155a987127a9f04c0b Mon Sep 17 00:00:00 2001 From: Javad Rahnama Date: Tue, 9 Jul 2024 15:40:29 -0700 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: DavoudEshtehari <61173489+DavoudEshtehari@users.noreply.github.com> --- .../netcore/src/Microsoft.Data.SqlClient.csproj | 2 +- .../netfx/src/Microsoft.Data.SqlClient.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 a2406f9649..3adc0617e8 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -20,7 +20,7 @@ $(NoWarn);IL2026;IL2057;IL2072;IL2075 - + true true 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 c5e7a10e5e..1f8e643a45 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -18,7 +18,7 @@ false $(DefineConstants);NETFRAMEWORK; - + true true