Loading plug-in DLL files, “The invoked member is not supported in a dynamic assembly.”

前端 未结 3 1889
时光取名叫无心
时光取名叫无心 2021-02-05 04:56

We have custom DLL\'s that are not included in our initial setup file. They are loaded at runtime. This process worked fine while using .NET 2.0, but we are getting the \"The

3条回答
  •  情书的邮戳
    2021-02-05 05:52

    This error is occurring because Assembly.Load cannot be called upon dynamic assemblies. You must filter out the dynamic assemblies before using them.

    var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(p => !p.IsDynamic);

提交回复
热议问题