Author |
Topic  |
|
cheetah
4 Posts |
Posted - 24 Jan 2007 : 13:54:39
|
I'm trying to build in my license file as an embedded resource so that I can do a ClickOnce deploy of the app. However, even without the ClickOnce deployment, this isn't working.
I make the call to ChartView.SetLicensePath in the static initializer for my class, so I'm quite sure it's getting called before any instances are created.
I put a breakpoint there in the debugger, and can see the resource stream with Assembly.GetManifestResourceStream("AssemblyName.QCLicense.lic.xml"), but I"m still getting the "your license has expired" message instead of my chart.
If I copy the license xml to the output dir, things work fine, but that won't work for a ClickOnce deployment, since data files end up in a different folder from DLLs. |
|
quinncurtis
1164 Posts |
Posted - 24 Jan 2007 : 15:18:25
|
What happens when you compile and run the LinePlotSalesVolume example program. That program demonstrates how to use an embedded license file. |
 |
|
cheetah
4 Posts |
Posted - 24 Jan 2007 : 15:40:17
|
It works, so I guess there must be something wrong with my project configuration ...
I did some more testing, and the problem seems to that my application is split into several projects. The chart ui elements are in a separate project from the main program, and thus compile to a DLL assembly and aren't in the main EXE assembly. If I embed the license into the EXE and call SetLicensePath("ExeAssemblyName") it works.
I'm guessing that the code to load the resource is accessing the wrong assembly to find it. Perhaps it should use Assembly.GetCallingAssembly() instead of GetEntryAssembly() or whichever one it is using? |
 |
|
quinncurtis
1164 Posts |
Posted - 24 Jan 2007 : 16:07:57
|
We intended that the license file be embedded in the main executable, so it is working as we would expect. |
 |
|
cheetah
4 Posts |
Posted - 25 Jan 2007 : 12:18:31
|
So should I interpret the limitation I found as a "yes we know and we won't fix it"? |
 |
|
quinncurtis
1164 Posts |
Posted - 25 Jan 2007 : 12:33:57
|
We have no plans to change our embedded licensing system to support embedding our license in any arbitrary DLL that is part of an overall application. The license needs to be embedded in the main exectuable of the application. |
 |
|
|
Topic  |
|