how to use loaded DLLS assembly' methods which is referenced to another assembly?
i have 2 assemblies. i added classlib1 into classLib2 references. like that:
USAGE:
namespace ClassLibrary2{ public class Class1 { public Class1() { } public int GetSum(int a , int b) { try { ClassLibrary1.Class1 ctx = new ClassLibrary1.Class1(); return ctx.Sum(a, b); } catch { return -1; } } }}
Why can not load and Exception error return to me:
Look inner exception: Could not load file or assembly 'ClassLibrary1 But i loaded Classlib2 abd Classlib1 . class2 depends on classlib1 how to use classlib1 method i want to use GetSum(int a , int b) method after load assemblies?
WCFC#ASP.NET
Last Comment
zofcentr
8/22/2022 - Mon
zofcentr
Is missing assembly file inside BIN directory of calling assembly (this one which is dynamically loading assemblies).
As you do not add references then normally it is not copied during build operation.
Check whether file exists and has correct version.
Other solution is to register it in GAC.
programmerist 1983
ASKER
do you have any professional answer? with code and technical help
As you do not add references then normally it is not copied during build operation.
Check whether file exists and has correct version.
Other solution is to register it in GAC.