Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception with RunEnvironment : Method not found with loggerfactory #17

Open
nagasivaram-tadepalli opened this issue Jun 4, 2020 · 3 comments

Comments

@nagasivaram-tadepalli
Copy link

nagasivaram-tadepalli commented Jun 4, 2020

Hi
I got this exception while running a sample with ASP.Net Core 3.1

: Method not found: 'Microsoft.Extensions.Logging.ILoggerFactory Microsoft.Extensions.Logging.DebugLoggerFactoryExtensions.AddDebug(Microsoft.Extensions.Logging.ILoggerFactory, Microsoft.Extensions.Logging.LogLevel)'.

@LCotts
Copy link

LCotts commented Jul 6, 2020

Also having this issue using .Net Core 3.1

@qfilip
Copy link

qfilip commented Jul 29, 2020

Same here. The issue, I think, is because ApiOperationBase has static Logger instance of type Microsoft.Extensions.Logging.ILogger, that is invoked in the ApiOperationBase constructor. But in case of .Net Core xx there's no way to pass ILogger reference (service?) to it...

@totalpanic
Copy link

Just for other people, I have compiled the code for Core 3.1. The change required is in the LogFactory.cs GetLog method :
return new LoggerFactory().CreateLogger(classType.FullName);

That have seems to do the trick. No more error and things seem to work as before.
Hope this helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants