System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object. at NetBarcode.Types.EAN13.GetEncoding()} | System.NullReferenceException
CODE:
var barcode = new Barcode(newStringValue, TypeNet.EAN13, true); <--- Exception origen
use implement
using NetBarcode; using TypeNet = NetBarcode.Type;
Ambient:
Ubuntu 20.04 NetCore 3.1
Hi, you install some native dependencies?
sudo apt install libc6-dev
sudo apt install libgdiplus
I have installed the depencencies that you comment and it keeps giving the error.
If you use (new Barcode("543534")).GetImage(); it works?
In my case this NullReferenceException was caused by country three digit code check, because the first three digit are 000, at: https://github.com/Tagliatti/NetBarcode/blob/master/NetBarcode/Types/EAN13.cs line 90 Its not stopped my app because the next check of two digit code does not throw an exception.