Skip to content

Commit 07532fe

Browse files
committed
Remove the separate development key
StyleCop Analyzers does not have a public API, so the additional strong name assurances provided by a dedicated development key are not needed.
1 parent b2f4e48 commit 07532fe

8 files changed

Lines changed: 3 additions & 104 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/StyleCop.Analyzers.CodeFixes.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@
3030

3131
<PropertyGroup>
3232
<SignAssembly>true</SignAssembly>
33-
<AssemblyOriginatorKeyFile Condition="'$(KeyConfiguration)' == 'Final'">..\..\build\keys\StyleCopAnalyzers.snk</AssemblyOriginatorKeyFile>
34-
<AssemblyOriginatorKeyFile Condition="'$(KeyConfiguration)' != 'Final'">..\..\build\keys\StyleCopAnalyzers.dev.snk</AssemblyOriginatorKeyFile>
35-
</PropertyGroup>
36-
37-
<PropertyGroup Condition="'$(KeyConfiguration)' != 'Final'">
38-
<DefineConstants>$(DefineConstants);DEVELOPMENT_KEY</DefineConstants>
33+
<AssemblyOriginatorKeyFile>..\..\build\keys\StyleCopAnalyzers.snk</AssemblyOriginatorKeyFile>
3934
</PropertyGroup>
4035

4136
<ItemGroup>

StyleCop.Analyzers/StyleCop.Analyzers/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
// COM, set the ComVisible attribute to true on that type.
1616
[assembly: ComVisible(false)]
1717

18-
#if DEVELOPMENT_KEY
19-
[assembly: InternalsVisibleTo("StyleCop.Analyzers.CodeFixes, PublicKey=0024000004800000940000000602000000240000525341310004000001000100fbe8bc154d11de9907c4e19600890ebef9cf9c8456c9a8ee05f0a8c9e69bd4f66c038ff4ea769c8864e6c5a38a1aad538876d6b2549962856f1b39e10d33bb13940c6538d2e863542ae15bc6e251946ca18094b6902690866d514f1fcd9395756732f927f9aeab1d6e1af5190816a251ad29db9c5b4cb86de7d909fc6c3d18a0")]
20-
#else
2118
[assembly: InternalsVisibleTo("StyleCop.Analyzers.CodeFixes, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ad62a4e5529344c07fe1455f270d61b205bdc8b0a94bcbe80b8506f28061073e4ed750b7e3d344f23213f671397a05e8c59b1434555f78edc091c0cf7b603011cf126aaa10116d890354f97f369ff56e24df17ee7f22cc3dd4d4b841d027d6d3d3b52a9a4462b8acf0f4bb9f400256ae18eed71070692e4cdd051498d04a66ed")]
22-
#endif
2319
[assembly: InternalsVisibleTo("StyleCop.Analyzers.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]
2420
[assembly: InternalsVisibleTo("StyleCop.Analyzers.Test.CSharp7, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]
2521
[assembly: InternalsVisibleTo("StyleCopTester, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c36d40d996fcc95fb6a89754728616758f459026e31478ce93633b3e27a4af416f103aa3d7a9e7998f829f8715cc1240d30724fd662042550fa71357b19562622424267e9e4640c403edbe64709a9ca5918128a9b9020b0db6e770d0dd1eac888869c23a835b74bde00e171984b1d1c24636cf030f0b23106e73035a2be145a6")]

StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@
2020

2121
<PropertyGroup>
2222
<SignAssembly>true</SignAssembly>
23-
<AssemblyOriginatorKeyFile Condition="'$(KeyConfiguration)' == 'Final'">..\..\build\keys\StyleCopAnalyzers.snk</AssemblyOriginatorKeyFile>
24-
<AssemblyOriginatorKeyFile Condition="'$(KeyConfiguration)' != 'Final'">..\..\build\keys\StyleCopAnalyzers.dev.snk</AssemblyOriginatorKeyFile>
25-
</PropertyGroup>
26-
27-
<PropertyGroup Condition="'$(KeyConfiguration)' != 'Final'">
28-
<DefineConstants>$(DefineConstants);DEVELOPMENT_KEY</DefineConstants>
23+
<AssemblyOriginatorKeyFile>..\..\build\keys\StyleCopAnalyzers.snk</AssemblyOriginatorKeyFile>
2924
</PropertyGroup>
3025

3126
<ItemGroup>

StyleCopAnalyzers.sln

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ EndProject
2727
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{A0840AD0-B615-487C-AEFF-9DCB691D037B}"
2828
ProjectSection(SolutionItems) = preProject
2929
build\build.ps1 = build\build.ps1
30-
build\check-key.ps1 = build\check-key.ps1
3130
StyleCop.Analyzers\Directory.Build.props = StyleCop.Analyzers\Directory.Build.props
3231
StyleCop.Analyzers\Directory.Build.targets = StyleCop.Analyzers\Directory.Build.targets
33-
build\keys.ps1 = build\keys.ps1
3432
build\opencover-report.ps1 = build\opencover-report.ps1
3533
build\push.ps1 = build\push.ps1
3634
build\version.ps1 = build\version.ps1

build/build.ps1

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
param (
22
[switch]$Debug,
33
[string]$VisualStudioVersion = '15.0',
4-
[switch]$SkipKeyCheck,
54
[string]$Verbosity = 'minimal',
65
[string]$Logger,
76
[switch]$Incremental
@@ -24,12 +23,6 @@ If ($Debug) {
2423
$BuildConfig = 'Release'
2524
}
2625

27-
If ($Version.Contains('-')) {
28-
$KeyConfiguration = 'Dev'
29-
} Else {
30-
$KeyConfiguration = 'Final'
31-
}
32-
3326
# download nuget.exe if necessary
3427
$nuget = '..\.nuget\nuget.exe'
3528
If (-not (Test-Path $nuget)) {
@@ -75,7 +68,7 @@ If ($Incremental) {
7568
$Target = 'rebuild'
7669
}
7770

78-
&$msbuild '/nologo' '/m' '/nr:false' "/t:$Target" $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" "/p:VisualStudioVersion=$VisualStudioVersion" "/p:KeyConfiguration=$KeyConfiguration" $SolutionPath
71+
&$msbuild '/nologo' '/m' '/nr:false' "/t:$Target" $LoggerArgument "/verbosity:$Verbosity" "/p:Configuration=$BuildConfig" "/p:VisualStudioVersion=$VisualStudioVersion" $SolutionPath
7972
If (-not $?) {
8073
$host.ui.WriteErrorLine('Build failed, aborting!')
8174
exit $LASTEXITCODE
@@ -86,29 +79,6 @@ if ($Incremental) {
8679
exit 0
8780
}
8881

89-
# By default, do not create a NuGet package unless the expected strong name key files were used
90-
if (-not $SkipKeyCheck) {
91-
. .\keys.ps1
92-
93-
foreach ($pair in $Keys.GetEnumerator()) {
94-
$assembly = Resolve-FullPath -Path "..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig\$($pair.Key)\StyleCop.Analyzers.dll"
95-
# Run the actual check in a separate process or the current process will keep the assembly file locked
96-
powershell -Command ".\check-key.ps1 -Assembly '$assembly' -ExpectedKey '$($pair.Value)' -Build '$($pair.Key)'"
97-
If (-not $?) {
98-
$host.ui.WriteErrorLine('Failed to verify strong name key for build, aborting!')
99-
exit $LASTEXITCODE
100-
}
101-
102-
$assembly = Resolve-FullPath -Path "..\StyleCop.Analyzers\StyleCop.Analyzers.CodeFixes\bin\$BuildConfig\$($pair.Key)\StyleCop.Analyzers.CodeFixes.dll"
103-
# Run the actual check in a separate process or the current process will keep the assembly file locked
104-
powershell -Command ".\check-key.ps1 -Assembly '$assembly' -ExpectedKey '$($pair.Value)' -Build '$($pair.Key)'"
105-
If (-not $?) {
106-
$host.ui.WriteErrorLine('Failed to verify strong name key for build, aborting!')
107-
exit $LASTEXITCODE
108-
}
109-
}
110-
}
111-
11282
if (-not (Test-Path 'nuget')) {
11383
mkdir "nuget"
11484
}

build/check-key.ps1

Lines changed: 0 additions & 31 deletions
This file was deleted.

build/keys.ps1

Lines changed: 0 additions & 24 deletions
This file was deleted.
-596 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)