Home

Driver can't reflect on a .net standard 2 library

This seems like a reflection issue, but I'll post it here nevertheless.
While playing with LLBLGenPro 5.3 beta (supports .netstandard 2) I found that the driver has problems reflecting over .netstandard 2.0 assembly.
Specially the method assembly.GetExportedTypes() in AssemblyProbe.GetTypeNames method would throw

System.IO.FileNotFoundException: 'Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.'

I tried reproducing it with a .net 4.6.2 console application and I see the same behavior.
The current workaround for my repro is to add the deprecated NETStandard.Library.NETFramework nuget package to the console.

Repro code

const string file = @[PATH]\ClassLibrary2.dll;
var assembly = Assembly.LoadFile(file);
var types = assembly.GetExportedTypes();

Comments

Sign In or Register to comment.