lundi 29 juin 2020

GetReferencedAssemblies throws "Operation is not supported on this platform"

I am working on .net standard library and I am trying to get all referenced assemblies from entry assembly.

Here is my code

AssemblyName[] allAssemblies = Assembly.GetEntryAssembly().GetReferencedAssemblies();

This code is working perfectly in debug mode , and i am able to get all referenced assemblies from the entry assembly(UWP app) .

But in release mode GetReferencedAssemblies() throws System.PlatformNotSupportedException: 'Operation is not supported on this platform.' exception , and am not able to get the referenced assemblies in uwp app.

Can anyone help me to solve this.

Thanks in advance.





Aucun commentaire:

Enregistrer un commentaire