Skip to content

Commit 49bd43c

Browse files
committed
Add file for strong naming assembly
If you use `sn -T` on the version 1.3.0 RabbitMQ dll, you get this: ``` lib\net6.0> sn -T .\RabbitMQ.Stream.Client.dll Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.0 Copyright (c) Microsoft Corporation. All rights reserved. .\RabbitMQ.Stream.Client.dll does not represent a strongly named assembly ``` Actually do the signing correctly. Thanks for double-checking @Zerpet Add `AltCoverStrongNameKey` to fix builds using AltCover
1 parent a9ee96a commit 49bd43c

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

.github/workflows/build-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ jobs:
7676
- name: Verify
7777
run: dotnet format ./rabbitmq-stream-dotnet-client.sln --no-restore --verbosity=diagnostic --verify-no-changes
7878
- name: Test
79-
run: dotnet test ./Build.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true
79+
run: dotnet test ./Build.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true /p:AltCoverStrongNameKey=${{github.workspace}}/rabbit.snk
8080
- name: Upload code coverage to Codecov
8181
run: bash <(curl -s https://codecov.io/bash)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build:
77
dotnet build $(CURDIR)/Build.csproj
88

99
test: build
10-
dotnet test $(CURDIR)/Tests/Tests.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true
10+
dotnet test $(CURDIR)/Tests/Tests.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true /p:AltCoverStrongNameKey=$(CURDIR)/rabbit.snk
1111

1212
rabbitmq-server:
1313
docker run -it --rm --name rabbitmq-stream-docker \

RabbitMQ.Stream.Client/RabbitMQ.Stream.Client.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1717
<PackageOutputPath>..\packages</PackageOutputPath>
1818
<RootNamespace>RabbitMQ.Stream.Client</RootNamespace>
19+
<SignAssembly>True</SignAssembly>
1920
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2021
<Title>RabbitMQ Stream Client Library for .NET</Title>
2122
</PropertyGroup>
@@ -27,8 +28,8 @@
2728
</ItemGroup>
2829

2930
<ItemGroup>
30-
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
31-
<_Parameter1>Tests</_Parameter1>
31+
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
32+
<_Parameter1>Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e5f75a5f3e8c9cf8151b55c3460da0f58823b3139dd0672f7aae5d875416c363cfdbee2d98a09ee53157213447a128893225a56871be16aba8aa57ac7ceb7824f03131c7c9028a8050660652b26ab7568eaeebf022948e496e00e35e01e5f56d67351278ec90b6c0bfc965610281e7bdf25b0c9e625fdde89f2ed5f3f5757bbc</_Parameter1>
3233
</AssemblyAttribute>
3334
</ItemGroup>
3435

Tests/Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4+
<AssemblyOriginatorKeyFile>../rabbit.snk</AssemblyOriginatorKeyFile>
45
<IsPackable>false</IsPackable>
56
<MinVerSkip>true</MinVerSkip>
7+
<SignAssembly>True</SignAssembly>
68
</PropertyGroup>
79

810
<ItemGroup>

rabbit.snk

596 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)