Given that Project A is a C# Class Library and that Project B is a console application that has a dependency on Project A.
In Project A the following class is defined:
public class ActionMailNotifier : RazorMailerBase
{
private readonly string _viewPath;
private readonly EmailHost _emailConfig;
...
...
}
"RazorMailBase" is contained in an external dll, ActionMailer.dll, that is referenced by Project A.
In Project B the following class is defined:
public class EmailFareMonitorAlertNotifier : ActionMailNotifier
{
...
...
}
If ActionMailer.dll is not referenced in Project B the compiler generates an error message indicating that a reference to ActionMailer.dll is required. Is there a way to structure this such that a reference to the external dll is not required in Project B?
No. As long as EmailFareMonitorAlertNotifier
ultimately derives from assembly external.dll
you need to reference it so that the compiler and runtime have the information necessary to use the type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With