Skip to content

Commit 0a7d192

Browse files
author
Javad Rahnama
authored
[5.1] eng | Address strong naming issues in created nugets (#2698) (#2702)
1 parent 5f7840e commit 0a7d192

File tree

6 files changed

+38
-2
lines changed

6 files changed

+38
-2
lines changed

eng/pipelines/common/templates/steps/build-all-configurations-signed-dlls-step.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ steps:
3636
inputs:
3737
solution: '**/build.proj'
3838
configuration: '${{parameters.Configuration }}'
39-
msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SignAssembly=true -p:AssemblyOriginatorKeyFile=$(Agent.TempDirectory)\netfxKeypair.snk'
39+
msbuildArguments: '-p:AssemblyFileVersion=${{parameters.AssemblyFileVersion }} -t:BuildAllConfigurations -p:GenerateNuget=false -p:SignAssembly=true -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk'
4040

4141
- ${{ if eq(parameters.product, 'AKV') }}:
4242
- task: MSBuild@1

eng/pipelines/common/templates/steps/code-analyze-step.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ steps:
3434
msBuildVersion: 17.0
3535
msBuildArchitecture: x64
3636
setupCommandlinePicker: vs2022
37-
msBuildCommandline: 'msbuild ${{parameters.sourceRoot}}\build.proj -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false'
37+
msBuildCommandline: 'msbuild ${{parameters.sourceRoot}}\build.proj -p:configuration=Release -p:GenerateNuget=false -p:BuildTools=false -p:SigningKeyPath=$(Agent.TempDirectory)\netfxKeypair.snk'
3838
- ${{ if eq(parameters.product, 'AKV') }}:
3939
- task: securedevelopmentteam.vss-secure-development-tools.build-task-roslynanalyzers.RoslynAnalyzers@3
4040
displayName: 'Guardian Dotnet Analyzers '

src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
<TargetGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETStandard'">netstandard</TargetGroup>
1313
<Platforms>AnyCPU;x64;x86</Platforms>
1414
</PropertyGroup>
15+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)==Official">
16+
<SignAssembly>true</SignAssembly>
17+
<DelaySign>true</DelaySign>
18+
<KeyFile>$(SigningKeyPath)</KeyFile>
19+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
20+
</PropertyGroup>
21+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)!=Official">
22+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
23+
</PropertyGroup>
1524
<ItemGroup>
1625
<Compile Include="Microsoft.Data.SqlClient.cs" />
1726
<Compile Include="Microsoft.Data.SqlClient.Manual.cs" />

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
2020
<Product>Core $(BaseProduct)</Product>
2121
</PropertyGroup>
22+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)==Official">
23+
<SignAssembly>true</SignAssembly>
24+
<DelaySign>true</DelaySign>
25+
<KeyFile>$(SigningKeyPath)</KeyFile>
26+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
27+
</PropertyGroup>
28+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)!=Official">
29+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
30+
</PropertyGroup>
2231
<PropertyGroup>
2332
<DebugType>portable</DebugType>
2433
<DebugSymbols>true</DebugSymbols>

src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
<Product>Framework $(BaseProduct)</Product>
99
<Configurations>Debug;Release;</Configurations>
1010
</PropertyGroup>
11+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)==Official">
12+
<SignAssembly>true</SignAssembly>
13+
<DelaySign>true</DelaySign>
14+
<KeyFile>$(SigningKeyPath)</KeyFile>
15+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
16+
</PropertyGroup>
17+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)!=Official">
18+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
19+
</PropertyGroup>
1120
<ItemGroup>
1221
<Compile Include="Microsoft.Data.SqlClient.cs" />
1322
</ItemGroup>

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@
5959
<ComCompatibleSideBySide>True</ComCompatibleSideBySide>
6060
<GenerateTargetFrameworkAttribute>False</GenerateTargetFrameworkAttribute>
6161
</PropertyGroup>
62+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)==Official">
63+
<SignAssembly>true</SignAssembly>
64+
<DelaySign>true</DelaySign>
65+
<KeyFile>$(SigningKeyPath)</KeyFile>
66+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
67+
</PropertyGroup>
68+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)!=Official">
69+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
70+
</PropertyGroup>
6271
<!-- ********************** Configuration and Platform specific properties ********************* -->
6372
<!-- All Available Configurations-->
6473
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />

0 commit comments

Comments
 (0)