Skip to content

Commit e26e1dd

Browse files
committed
✅ ensure that the log4net assembly is always signed
1 parent 7a1a5f0 commit e26e1dd

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

src/log4net.Tests/Signing.cs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using log4net.Repository;
2+
using NUnit.Framework;
3+
using NExpect;
4+
using static NExpect.Expectations;
5+
6+
namespace log4net.Tests
7+
{
8+
[TestFixture]
9+
public class Signing
10+
{
11+
[Test]
12+
public void AssemblyShouldBeSigned()
13+
{
14+
// Arrange
15+
var asm = typeof(LoggerRepositorySkeleton).Assembly;
16+
// Act
17+
var result = asm.GetName().GetPublicKey();
18+
// Assert
19+
Expect(result)
20+
.Not.To.Be.Empty();
21+
}
22+
}
23+
}

src/log4net/AssemblyInfo.cs

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
using System.Reflection;
2121
using System.Runtime.CompilerServices;
2222

23+
// [assembly:AssemblyKeyFile("log4net.snk")]
24+
2325
#if (!SSCLI)
2426
//
2527
// log4net makes use of static methods which cannot be made com visible

0 commit comments

Comments
 (0)