[Mono-list] Licenses.licx issues

Atsushi Eno atsushi at ximian.com
Mon Dec 1 19:16:50 EST 2008


To my understanding there is no work on lc.exe and license.licx stuff

Atsushi Eno

Shunyata Kharg wrote:
> Hello!
> I have a .net dll built under windows .NET which implements the
> LicenseProviderAttribute class. Under windows .NET, I can do the following:
> lc /target:helloworld.exe /complist:licenses.licx /i:mylibrary.dll
> csc /reference:mylibrary.dll /resource:helloworld.exe.licenses helloworld.cs
> where lc.exe is the "License Compiler". This produces an executable,
> helloworld.exe, which I can run under windows .NET without the need for
> either the public or private license-enabling registry keys to be present in
> the registry. However, when I try and run this executable under Mono, I get
> the following error:
> Unhandled Exception: System.ComponentModel.LicenseException: A system
> exception has occurred.
>   at System.ComponentModel.LicenseManager.Validate (System.Type type,
> System.Object instance) [0x00000] 
> The only way I can get helloworld.exe to run under Mono is to install the
> private registry key of the license. I think the issue is related to the way
> Mono implements the method
> System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey. Under
> windows .NET, this method checks the manifest resources of all assemblies in
> the domain for the existence of the embedded licenses.licx. Under Mono, this
> does not happen. It seems that under Mono, the license key somehow has to be
> previously assigned using the
> System.ComponentModel.Design.RuntimeLicenseContext.SetSavedLicenseKey
> method. Can anybody please give me some more details on how this is supposed
> to work?
> The other thing I would like to know, if possible, is: does Mono ship with
> an equivalent of lc.exe which I can use to compile in the licenses.licx file
> when building assemblies under Mono? 
> Thank you in advance for any comments.

More information about the Mono-list mailing list