Hello.
I'm playing around with reflection and most of it works well.
At the moment I feel like "Pareto": 99% of the questions are answered in 1% of my time. For the last answer (1%) I'm now searching too long (99% ): To solve this, I need you! Thanks in advance
Let me explain:
In VS2022 I created a solution with the following projects:
1) PluginDLL1 (Class library): There is one class "DummyPlugin" with one method which returns "Hello from PluginDLL1".
2) PluginDLL2(Class library): There is one class "DummyPlugin" with one method. The method returns the concat of "Hello from PluginDLL2 + Hello from PluginDLL1". (In this project there is a project reference to the PluginDLL1. The second part is the return string from PluginDLL1...
3) TestConsole1: In this project there are project references to both class libraries. The calls of the method of both libraries are working fine.
Until now there is no problem!
4) TestConsole2_REFLECTION. With reflections I already tested the Assembly.LoadFrom() for both DLL and this works fine. But in my final application I will consume the DLLs from a database (binary data). (The database writing and reading of the file context works fine.)
With this I could successfully run the PluginDLL1 with the command Assembly.Load(<bytearrayFileContent>), because there is no reference to a third party DLL.
But, the same call with PluginDLL2 shows the following exception because of the missing DLL reference).
My question is how to add referenced libraries FROM MEMORY? Please note, I don't want to use the file system for this.
Thank you in advance for your answers!
I'm playing around with reflection and most of it works well.
At the moment I feel like "Pareto": 99% of the questions are answered in 1% of my time. For the last answer (1%) I'm now searching too long (99% ): To solve this, I need you! Thanks in advance
Let me explain:
In VS2022 I created a solution with the following projects:
1) PluginDLL1 (Class library): There is one class "DummyPlugin" with one method which returns "Hello from PluginDLL1".
2) PluginDLL2(Class library): There is one class "DummyPlugin" with one method. The method returns the concat of "Hello from PluginDLL2 + Hello from PluginDLL1". (In this project there is a project reference to the PluginDLL1. The second part is the return string from PluginDLL1...
3) TestConsole1: In this project there are project references to both class libraries. The calls of the method of both libraries are working fine.
Until now there is no problem!
4) TestConsole2_REFLECTION. With reflections I already tested the Assembly.LoadFrom() for both DLL and this works fine. But in my final application I will consume the DLLs from a database (binary data). (The database writing and reading of the file context works fine.)
With this I could successfully run the PluginDLL1 with the command Assembly.Load(<bytearrayFileContent>), because there is no reference to a third party DLL.
But, the same call with PluginDLL2 shows the following exception because of the missing DLL reference).
My question is how to add referenced libraries FROM MEMORY? Please note, I don't want to use the file system for this.
Thank you in advance for your answers!