Skip to content

Commit

Permalink
Add file for strong naming assembly
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lukebakken committed May 10, 2023
1 parent e42d8fe commit 5735010
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ jobs:
- name: Verify
run: dotnet format ./rabbitmq-stream-dotnet-client.sln --no-restore --verbosity=diagnostic --verify-no-changes
- name: Test
run: dotnet test ./Build.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true
run: dotnet test ./Build.csproj --no-build --logger "console;verbosity=detailed" /p:AltCover=true /p:AltCoverStrongNameKey=${{github.workspace}}/rabbit.snk
- name: Upload code coverage to Codecov
run: bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
dotnet build $(CURDIR)/Build.csproj

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

rabbitmq-server:
docker run -it --rm --name rabbitmq-stream-docker \
Expand Down
5 changes: 3 additions & 2 deletions RabbitMQ.Stream.Client/RabbitMQ.Stream.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageOutputPath>..\packages</PackageOutputPath>
<RootNamespace>RabbitMQ.Stream.Client</RootNamespace>
<SignAssembly>True</SignAssembly>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Title>RabbitMQ Stream Client Library for .NET</Title>
</PropertyGroup>
Expand All @@ -27,8 +28,8 @@
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>Tests</_Parameter1>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e5f75a5f3e8c9cf8151b55c3460da0f58823b3139dd0672f7aae5d875416c363cfdbee2d98a09ee53157213447a128893225a56871be16aba8aa57ac7ceb7824f03131c7c9028a8050660652b26ab7568eaeebf022948e496e00e35e01e5f56d67351278ec90b6c0bfc965610281e7bdf25b0c9e625fdde89f2ed5f3f5757bbc</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyOriginatorKeyFile>../rabbit.snk</AssemblyOriginatorKeyFile>
<IsPackable>false</IsPackable>
<MinVerSkip>true</MinVerSkip>
<SignAssembly>True</SignAssembly>
</PropertyGroup>

<ItemGroup>
Expand Down
Binary file added rabbit.snk
Binary file not shown.

0 comments on commit 5735010

Please sign in to comment.