Skip to content

Commit 39d6664

Browse files
author
Javad Rahnama
authored
[5.2] Fix strong name issue (#2701)
1 parent 85de4d8 commit 39d6664

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
@@ -21,6 +21,15 @@
2121
<EnableTrimAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</EnableTrimAnalyzer>
2222
<NoWarn>$(NoWarn);IL2026;IL2057;IL2072;IL2075</NoWarn>
2323
</PropertyGroup>
24+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)==Official">
25+
<SignAssembly>true</SignAssembly>
26+
<DelaySign>true</DelaySign>
27+
<KeyFile>$(SigningKeyPath)</KeyFile>
28+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
29+
</PropertyGroup>
30+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)!=Official">
31+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
32+
</PropertyGroup>
2433
<PropertyGroup>
2534
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
2635
</PropertyGroup>

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
@@ -64,6 +64,15 @@
6464
<ComCompatibleSideBySide>True</ComCompatibleSideBySide>
6565
<GenerateTargetFrameworkAttribute>False</GenerateTargetFrameworkAttribute>
6666
</PropertyGroup>
67+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)==Official">
68+
<SignAssembly>true</SignAssembly>
69+
<DelaySign>true</DelaySign>
70+
<KeyFile>$(SigningKeyPath)</KeyFile>
71+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
72+
</PropertyGroup>
73+
<PropertyGroup Condition="$(CDP_BUILD_TYPE)!=Official">
74+
<AssemblyOriginatorKeyFile>$(SigningKeyPath)</AssemblyOriginatorKeyFile>
75+
</PropertyGroup>
6776
<!-- ********************** Configuration and Platform specific properties ********************* -->
6877
<!-- All Available Configurations-->
6978
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />

0 commit comments

Comments
 (0)