Free Support Forum - groupdocs.com

Signature DLL and License in the same folder issue

Per the instructions, I’ve placed the license file in the same directory as the Signature DLL but I’m still receiving an error that the license was not found. Please see the attachment. Thank you.

image.png (14.0 KB)

Hi @rcabrera

Sometimes this relative path is not working properly.
So I would like to ask you to try following code and pass absolute path file license file name

Assembly asm = Assembly.GetExecutingAssembly();
Uri uri = new Uri(asm.CodeBase);
var path = Path.GetDirectoryName(uri.LocalPath);
path = Path.Combine(path, "GroupDocs.Signature.for.NET.lic"); 
License license = new License();
license.SetLicense(path);

And join required namespaces like

using System;
using System.IO;
using System.Reflection;

One more you can check while debugging the path and ensure its the proper one.

Hope it will help.

Thank you!