File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/BenchmarkDotNet/Validators Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,17 @@ public IEnumerable<ValidationError> Validate(ValidationParameters validationPara
19
19
{
20
20
foreach ( var group in validationParameters . Benchmarks . GroupBy ( benchmark => benchmark . Descriptor . Type . GetTypeInfo ( ) . Assembly ) )
21
21
{
22
- foreach ( var referencedAssemblyName in group . Key . GetReferencedAssemblies ( ) )
22
+ // GetReferencedAssemblies() is not supported in NativeAOT currently.
23
+ AssemblyName [ ] referencedAssemblies ;
24
+ try
25
+ {
26
+ referencedAssemblies = group . Key . GetReferencedAssemblies ( ) ;
27
+ }
28
+ catch ( NotSupportedException )
29
+ {
30
+ referencedAssemblies = Array . Empty < AssemblyName > ( ) ;
31
+ }
32
+ foreach ( var referencedAssemblyName in referencedAssemblies )
23
33
{
24
34
var referencedAssembly = Assembly . Load ( referencedAssemblyName ) ;
25
35
You can’t perform that action at this time.
0 commit comments