This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Problem: I get license exceptions when I try to merge the Property Grid DLL with my WPF exe. Background: We want to distribute the Mindscape property grid in one of our WPF applications. For a variety of reasons, we want to use a tool like ILMerge or .NET Reactor to merge our DLLs with our exe. Although it seems like it would work, I keep hitting a problem with the property grid assembly. Specifically, when I try to run the merged assembly, I get a LicenseException (screenshot of callstack attached). I tried step 2 in the License Exception FAQ but it didn't help. When I checked other sites, I discovered that Actipro worked on this problem for their controls. (http://www.actiprosoftware.com/Support/Forums/ViewForumTopic.aspx?ForumTopicID=1366). Might there be a similar problem here? Thanks, -Craig |
|
|
I've raised this with our licensing vendor. They're usually pretty quick about responding and I'll update you when we know more. |
|
|
Hello Craig, We've had a look into this and we now have a mechanism which will allow the licence check to pass in ILMerge, which will be available in nightly builds dated 1 May 2009 and above, available from about 1430 GMT. You will need to do two things: * Open a command prompt in the bin directory and type wpfpgrtl xxxx-xxxx where xxxx-xxxx is the contents of the .lic file. This will output a runtime licence key to the console. * In your application code, before creating any instances of the grid, call the static method PropertyGrid.InstallLicense("yyyy") where yyyy is the output of wpfpgrtl. Note that InstallLicense is EditorBrowsable(Never) so it will not show up in Intellisense (because we don't want people to use it by accident instead of automatic licensing), but it does exist and will compile! A good place to do this is in the constructor of the App class. This will satisfy the licensing checks. However there appears to be a rather more fundamental problem with ILMerge and XAML: if you have a control defined in Assembly A, and you use that control in XAML in Assembly B, then ILMerge A and B, then the control fails to load. I believe this is due to the fact that XAML objects are assembly qualified, i.e. when you write: <Window xmlns:tc="clr-namespace:TestyControls;assembly=TestyControls"> ILMerge does not know to update the xmlns declaration to point at the merged assembly. (Using a XmlnsDefinition a la xmlns:ms="http://..." does not appear to help with this though I have not tested it in depth.) This is not a licensing issue or a property grid issue -- I have reproduced this with a test custom control which had no licensing on it at all -- it is a WPF/XAML issue and outside our control. So you will need to select a tool other than ILMerge, or contact the author of ILMerge to see if he is able to address this issue or has any suggestions on working around it. |
|
|
First off, thanks for your rapid reply. I've become aware of the problem with ILMerge and I've been trying to do merging with several different tools, and all seem to have their own shortcomings. (in fact, if you guys were to author a merging/obfuscation tool that worked, I'd probably be first in line to purchase it). However, I did run into two cases where a merged application was created but the property grid couldn't find the license so the above will be very helpful. Thanks again, -Craig |
|