I have a strange mistake and donβt know why.
Type names passed to Assembly.GetType() must not specify an assembly.
The strange thing: I do not use the GetType () method myself. This is caused by the following line:
var domainCommunicator = (DomainCommunicator)dmn.CreateInstanceAndUnwrap(typeof(DomainCommunicator).FullName, "DomainCommunicator");
domainCommunicator inherits from MarshalByRefObject. This is publicly available, but when I change it to private, I get an exception that the assembly cannot be loaded. When I create an additional project in my solution and do not completely expose the .dll, nothing changes. Perhaps because I should have a link to the main project in my new AppDomain.
It is best to skip the DomainCommunicator class in reflection. It must be private and that. What exactly caused the exception?
source share