Skip to content

Commit 149ea7a

Browse files
committed
Add Unsafe assembly to Roslyn Generator.
1 parent 40a1c2b commit 149ea7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/BenchmarkDotNet/Toolchains/Roslyn/Generator.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.IO;
33
using System.Linq;
44
using System.Reflection;
5+
using System.Runtime.CompilerServices;
56
using BenchmarkDotNet.Extensions;
67
using BenchmarkDotNet.Portability;
78
using BenchmarkDotNet.Running;
@@ -56,7 +57,8 @@ internal static IEnumerable<Assembly> GetAllReferences(BenchmarkCase benchmarkCa
5657
new[]
5758
{
5859
benchmarkCase.Descriptor.Type.GetTypeInfo().Assembly, // this assembly does not has to have a reference to BenchmarkDotNet (e.g. custom framework for benchmarking that internally uses BenchmarkDotNet
59-
typeof(BenchmarkCase).Assembly // BenchmarkDotNet
60+
typeof(BenchmarkCase).Assembly, // BenchmarkDotNet
61+
typeof(Unsafe).Assembly // Unsafe
6062
})
6163
.Distinct();
6264
}

0 commit comments

Comments
 (0)