I am trying to use log4net.ThreadContext.Properties["subjectProperty"] = emailsubject
in my project.
I have 2 differnt projects
- Web - MVC
- Business Layer
WEB - MVC project has reference to Combres
Business Layer has reference to log4net (here i have extended SMTPAppender for dynamic email address)
So at runtime I am having this error:
duplicate reference exists in Combres and log4Net for ThreadContext
I have added the extern keyword to resolve issue
I used the properties window to change the alias for the assembly from 'global' to 'MyAlias'
At the top of the file where the aliased assembly is used, I put extern alias MyAlias
. This must be before any using statements.
I followed this:
Use the alias prefix to use the namespace you want, for example using
MyAlias::MyNamespace
.
But I have this error:
The extern alias 'xxx' was not specified in a /reference option