soldierq / QLicense

A Ready To Use Software Licensing Solution in C#
MIT License
181 stars 93 forks source link

Object reference not set to an instance of an object. #2

Closed kcmv closed 7 years ago

kcmv commented 7 years ago

the sample demo works, but when i try to apply it on my proj it got an error, Object reference not set to an instance of an object.

//Read public key from assembly

        Assembly _assembly = Assembly.GetExecutingAssembly();
        using (MemoryStream _mem = new MemoryStream())
        {

           // this line got an error
          _assembly.GetManifestResourceStream("Form1.LicenseVerify.cer").CopyTo(_mem);

            _certPubicKeyData = _mem.ToArray();
        }

can you help on this? I've recently download the update version from your article on codeproject, before your update, i got this form working, but it got some issues after

kcmv commented 7 years ago

i already solved the problem, i forgot to set the license property as an embedded resource