Assembly in asp.net

I have one assembly. I need to use this assembly in my application. I do not want to reference this assembly, not the GAC.

How to use this assembly in my application?

+3
source share
2 answers

Use dynamic mapping and loading so you can call methods.

here is one example of this

Assembly assembly = Assembly.LoadFrom("MyNice.dll");

Type type = assembly.GetType("MyType");

object instanceOfMyType = Activator.CreateInstance(type);

Dynamically load an assembly in Runtime and call its methods

+3
source

One option is to use reflection

More information on a possible implementation can be found at this link.

http://www.codeproject.com/KB/cs/csharpreflection.aspx

+2
source

Source: https://habr.com/ru/post/1759112/


All Articles