Using a license protected library
Options
I want to use an external library. The library is license-protected. A serial number must be provided before the first object can be created. I called the required method (Licensing.AddSerialNumber("...")) in the first line of the query (C# Statements) but got an exception ("Library...not licensed") in the line after where an object is created.
The library developer assumes that LINQPad is loading some types before the query is executed so the licensing is to late. Is it possible to do the licensing earlier?
The library developer assumes that LINQPad is loading some types before the query is executed so the licensing is to late. Is it possible to do the licensing earlier?
Comments
-
LINQPad does not load any types before executing the query, AFAIK. Are you sure the error is occurring before Licensing.AddSerialNumber runs?
-
You could try change from C# Statements to C# Program in the style like
void Main() { Licensing.AddSerialNumber("..."); MyCode(); } private void MyCode() { .... }
This should mean the licensing is done before any of your other code comes into scope and hence before any types are loaded. -
It works. Thank you very much!