Closed 0xced closed 2 years ago
I have exactly this problem after updating to the latest version a moment ago.
When I use the library in this way it throws an error:
this.Logger.LogInformation($"File size: {ByteSize.FromBits(fileInfo.Length)}");
While waiting for a new version you can workaround this issue by explicitly specifying a format string, for example:
this.Logger.LogInformation($"File size: {ByteSize.FromBits(fileInfo.Length):0.0}");
Also enable nullable reference types that helps catching these kind of bugs.