I have a project processor, and it depends on the other 2 projects.
When I compile the project, I get the dll Processor.dll and another project-dependent dll in the Bin folder. Processor.dll BusinessAction.dll and Repository.dll.
I tried to call a method from Processor.dll by initiating the ProcessRequest class .
Like this
Assembly processorAssembly = Assembly.LoadFile(path + "Processor.DLL"));
Type myType= processorAssembly.GetType("Namespace.ProcessRequest");
myType.InvokeMember("Process", BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public, null, submitOfferType, new object[] { 12345 });
The processing method has some logic for processing and storing it in the database.
when I call the procee method using InvokeMember ()
i get exception Failed to load file or assembly 'Namespace.BusinessAction, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null' or one of its dependencies. The system cannot find the specified file.
Am I calling a method?