Open jacksonwj opened 2 years ago
Yes. It's a bug
Any progress? Or may I commit a PR?
i also have this problem
You can get passed this error by using default instances of NullLogger.Instance instances in your constructor.
ILogger _logger = NullLogger.Instance; var media = new MediaInfoWrapper(@"C:\Users\foo\Downloads\06ebb72b-be94-4953-9829-be419eb86f691824599253097493635.mp4",_logger);
All worked as expected...
I also have this problem after updating to v21.9.3.
I think this is due to the new version of Microsoft.Extensions.Logging.Abstractions
enforcing that the instance is not null
.
As I see it, there's two possible solutions:
null
default for logger
parameter in the constructors.logger
to NullLogger.Instance
(similar to @squareballstudios's suggestion).I, personally, prefer option 2 as it preserves previous behavior.
Just encountered this issue trying to use the package for the first time. Reverting to version 21.9.2 worked for me.
Version 21.9.3
When I new an instance like this
It will throw an exception
The code in source
MediaInfoWrapper.cs
Is it a BUG?