08-27-2007 08:47 AM
The exact question is:
How to manage the licence file when you have an application A who call an assembly B who call the NI Analysis measurement studio assembly?
I build my own assembly use for calculations and this assembly calls some methods of the NI Analysis assembly.
In my own assembly (C#), all is working fine (the licx file is correctly used).
As soon as I try to use my own assembly in another assembly or application, I’ve got this following message:
« The Measurement Studio assemblies used in this application are unlicenced (...) »
At this level I expect that the licence must be only managed by the assembly who is using NI Analysis methods.
Software configuration:
- Measurement Studio 7.0
National Instruments Analysis Enterprise, runtime version v1.1.4322, version 7.0.0.341
- .NET 2003
Framework 1.1, version 1.1.4322 SP1
Moreover, when this time I try to include the licence managing in the application by adding calling a NI Analysis method to workover this problem, I’ve got another problem:
If I call first a local method to the application who invokes a NI Analysis method before my own method in another assembly, all is working fine.
As soon as I first call my own method in another assembly and after a local method to the application who invoke a NI Analysis method, I’ve got the same error message.
Please someone can tell me how to manage NI software licence in this case?
Please find enclose a small C# project
Thank's for help
08-27-2007 11:54 AM
08-27-2007 03:45 PM
{
ClassLibrary1.Class1 toto =
new ClassLibrary1.Class1();}
{
ClassLibrary1.Class1 toto =
new ClassLibrary1.Class1();FakeFunction1();
}
Theses 2 ways of changing the code have the same effect on my computer, when I activate the checkbox, I obtain the error message.
Is it the same for you?
08-28-2007 09:01 AM
Hi XavierS,
I took your exact code that you provided me, deleted those pre-build steps,
re-built the assembly and the project and I did not receive any errors. I was
able to run your Windows application and click the checkbox without issues.
When you posted back, I once again tested out your application (both the
original application and the suggestions you made in the post of moving
FakeFunction1() and didn't have any problems at all.
In your main windows application, try refreshing the project license file under
Measurement Studio >> Refresh Project License File. Also, does the
menu, Measurement Studio >> Licenses show everything as Valid License?
If all of these are fine, try sending me another version of your project with
the updates you have made and I can try and run it again.
Thanks
08-28-2007 09:48 AM
Hi Jonathan,
08-28-2007 11:02 AM
08-28-2007 11:10 AM
08-28-2007 11:22 AM
I've just read the "Licensing Measurement Studio .NET Controls without Integrated Tools" help topic.
In fact (and unfortunately) I have already complete manualy the .licx file to add the Analysis line. Because I found that when I add a NI graphic control, the .licx is automaticaly created/updated but not for Analysis components. (At the beginning, before doing this, each calling of Methods of the analysis assembly make the error message box appear)
Are the .licx files at the good place in the project?
Does we need a .licx in the application project as soon as only the assembly called by this application is directly using the Analysis components?
Xavier.
08-28-2007 11:45 AM
08-28-2007 12:07 PM
All is working fine now !
I set all the parameters as you describe, the Build Action property on the licenses.licx file was set to Embedded Resource but a manual cleanning of all the project and a rebuild of all the elements was necessary to make it work.
I will try noy to apply all of this on a more slightly complex project.
Thank you for the help.