Add strong name signing for netstandard libraries

This commit is contained in:
Frans van Dorsselaer committed 2024-12-26 21:34:52 +01:00
1 parent a1a675c798
commit 7dba8c1038
6 files changed
+23 -6

No files matched your search

+1
View File
@@ -17,6 +17,7 @@
*.yml text
*.sln text
*.snk binary
*.csproj text
*.cs text eol=crlf
+1 -5
View File
@@ -38,12 +38,8 @@ SPDX-License-Identifier: GPL-3.0-only
<SelfContained>false</SelfContained>
<IsPackable>false</IsPackable>
<IsPublishable>false</IsPublishable>
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
<GenerateDependencyFile>false</GenerateDependencyFile>
<!--
See https://github.com/dotnet/roslyn/issues/41640
-->
<!-- See https://github.com/dotnet/roslyn/issues/41640 -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PublishDocumentationFiles>false</PublishDocumentationFiles>
<NoWarn>CS1591</NoWarn>
+12 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-FileCopyrightText: 2024 Frans van Dorsselaer
@@ -6,6 +6,17 @@ SPDX-License-Identifier: GPL-3.0-only
-->
<Project>
<PropertyGroup>
<!-- This is not set by default, but this is the sane default. -->
<IsTrimmable Condition="'$(IsTrimmable)' != 'false' And $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
<!-- This is not set by default, but this is the sane default. -->
<IsAotCompatible Condition="'$(IsAotCompatible)' != 'false' And $([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
<!-- This is set to false by default, but this is a better sane default. -->
<!-- See: https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming#create-strong-named-net-libraries -->
<SignAssembly Condition="$(TargetFramework.Contains('netstandard'))">true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\strongname.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<Target Name="RemoveDebug" AfterTargets="Publish">
<ItemGroup>
<DebugFiles Include="$(PublishDir)\**\*.pdb" />
+6
View File
@@ -8,6 +8,12 @@
"resolved": "1.1.0",
"contentHash": "oabDrUuI3t6viTgMJPb6M6fYYHZBFkHG5QPNPJvIQayKi2LhEgIEeiyfyUKr1RQrr1imDEI4z8VOgEUndfzVnw=="
},
"Microsoft.NET.ILLink.Tasks": {
"type": "Direct",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "zAwp213evC3UkimtVXRb+Dlgc/40QG145nmZDtp2LO9zJJMfrp+i/87BnXN7tRXEA4liyzdFkjqG1HE8/RPb4A=="
},
"Microsoft.NET.Test.Sdk": {
"type": "Direct",
"requested": "[17.12.0, )",
BIN
View File
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 Frans van Dorsselaer
SPDX-License-Identifier: GPL-3.0-only