From 0a7d19240d0429a8b393b682aee5a2bd8721c226 Mon Sep 17 00:00:00 2001 From: Javad Rahnama Date: Wed, 31 Jul 2024 10:51:47 -0700 Subject: [PATCH] [5.1] eng | Address strong naming issues in created nugets (#2698) (#2702) --- .../steps/build-all-configurations-signed-dlls-step.yml | 2 +- .../common/templates/steps/code-analyze-step.yml | 2 +- .../netcore/ref/Microsoft.Data.SqlClient.csproj | 9 +++++++++ .../netcore/src/Microsoft.Data.SqlClient.csproj | 9 +++++++++ .../netfx/ref/Microsoft.Data.SqlClient.csproj | 9 +++++++++ .../netfx/src/Microsoft.Data.SqlClient.csproj | 9 +++++++++ 6 files changed, 38 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 1b8401cbc3..647c0ff35f 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:SignAssembly=true -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 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/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj index 41e1263abc..5df3580b25 100644 --- a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj @@ -12,6 +12,15 @@ netstandard 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 5e08a713a5..08af099e22 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj @@ -19,6 +19,15 @@ true Core $(BaseProduct) + + true + true + $(SigningKeyPath) + $(SigningKeyPath) + + + $(SigningKeyPath) + portable true 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 7a80ce32da..8e70505f57 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,15 @@ 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 a10a693406..1a8063169c 100644 --- a/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj @@ -59,6 +59,15 @@ True False + + true + true + $(SigningKeyPath) + $(SigningKeyPath) + + + $(SigningKeyPath) +