Add strong name signing (#2575)

This commit is contained in:
Andrey Tretyak
2022-10-10 10:03:51 -07:00
committed by GitHub
parent fa29939f50
commit 40b2111f4d
6 changed files with 14 additions and 3 deletions

7
Directory.Build.props Normal file
View File

@@ -0,0 +1,7 @@
<Project>
<PropertyGroup Label="Strong name signing">
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\key.snk</AssemblyOriginatorKeyFile>
<StrongNameSuffix>, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f1e6b635f0c0b44c03d712e4f2cf789ddb54d7f74a9b34e2ece3aafb6afbfd46ec2b033f4104ef88f6afec226c5c647f453852ba3847fd9e37727c7dcb54e24731a288a107457a2c3e8b26ab04c25b206797be48cfe7a2b2c427422d0b0dd18c82111f21798f997e5d33ecc25c677744709c3785e0e650d6e0456a034a31acc4</StrongNameSuffix>
</PropertyGroup>
</Project>

View File

@@ -5,6 +5,7 @@
<AssemblyTitle>Octokit.Tests.Integration</AssemblyTitle>
<Authors>GitHub</Authors>
<TargetFrameworks>net6.0;netcoreapp3.1;net462</TargetFrameworks>
<SignAssembly>false</SignAssembly>
<NoWarn>$(NoWarn);CS4014;CS1998</NoWarn>
<AssemblyName>Octokit.Tests.Integration</AssemblyName>
<PackageId>Octokit.Tests.Integration</PackageId>

View File

@@ -32,4 +32,9 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Label="InternalsVisibleTo attributes">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Octokit.Tests$(StrongNameSuffix)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Project>

View File

@@ -1,3 +0,0 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Octokit.Tests")]

View File

@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<SignAssembly>false</SignAssembly>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)/..</RunWorkingDirectory>
</PropertyGroup>

BIN
key.snk Normal file

Binary file not shown.