jeudi 26 novembre 2020

Mark a whole assembly as dynamically accessed

With .NET 5, we can trim our project to reduce it's footprint. If we know that we will access a Type via reflection, we can mark it as dynamically accessed:

public void DoSomethingReflective<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>();

But is there also a way to mark a whole assembly as dynamically accessed?

public void DoSomethingReflective(Assembly assembly);




Aucun commentaire:

Enregistrer un commentaire