Hi there,
for the first time I am trying not to package the corelab.dll with an exe file but with a class lib.
I have created a dll which is referencing the corelab.dll and I have tried not only just creating the licenses.licx file (and embedding it) but I have also tried to embedd the dll.licenses file (manually compiled - namespace not empty that's why only "dll.licenses") but whenever I am referencing my library from a new solution and try to initialize the mysql connection I get a license not valid error.
Am I missing something?
So I am feeling I am just doing something wrong here.
Thanks for your support!
Best regards,
Tillman
UPDATE: well, shame on me - I just should have read the doc more carefully. After creating a licenses.config file and placing it into the dll solution root it almost works as expected. Now I can get it to work with referencing my dll and the corelab dll independently from my test solution but as soon as I am referencing the ILMerge'd version I get a license not found error.
License issue with dll - Partially Solved
Thanks for getting back to me so quickly Alexey!
The licenses.licx resource is embedded into my dll project.
After compilation I am using ILMERGE to merge this dll with the corelab.dll.
Then I am referencing this in my testproject (simple winform exe) to see if my dll works and I am always facing the license not found error.
When I don't merge the DLLs everything works fine.
Thanks for your support!
Best regards,
Tillman
The licenses.licx resource is embedded into my dll project.
After compilation I am using ILMERGE to merge this dll with the corelab.dll.
Then I am referencing this in my testproject (simple winform exe) to see if my dll works and I am always facing the license not found error.
When I don't merge the DLLs everything works fine.
Thanks for your support!
Best regards,
Tillman
The matter is that the name of the assembly, where license resource was initially compiled, and the name of the assembly, where license finally appears, must be equal. So, there are two ways to overcome the problem:
- set the name of ILMERGE output assembly equal to the name of the compiled assembly;
- create license resource separately and embed it to the merged assembly.