Feature usage reporting with multiple assemblies

williamwwilliamw Posts: 13 Bronze 1
edited June 18, 2013 8:19AM in SmartAssembly
I have an application that is built using several assemblies. Both the main executable and the assemblies contain features that I want to do usage reporting on. The assemblies are not being merged into the application but they are getting run through SmartAssembly for protection.

What do I need to do to get feature reporting for all the assemblies? Do I have to turn on the option in SmartAssembly for each assembly? Or is turning it on in the main (executable) assembly enough if I have put the attributes in the other assemblies?

If I need to configure it separately for each assembly, does the user get prompted separately when each assembly tries to report usage? If I use the same application name for all of them will that be enough?

Comments

  • You'll need to apply smartassembly to each assembly that you want this to work on. So that's one extra smartassembly project for each assembly that is not a direct dependency in the 'main' project
  • I have the same issue in my application.

    When applying feature usage reporting to the different assemblies, this results in each assembly being considered a different "version", even if the have the same application name. So even if they belong to the same application, you will see the feature reports being split up. Depending on how you handle asking the user for consent, this can also result in a prompt for each assembly.

    The way I solved it was by having a method to report usage in an assembly known by all assemblies, which is wrapper over the actual call to usage reporting. That way, there is only one assembly which gets feature reporting compiled into it, and thus all feature reports for the application appear together.
  • williamwwilliamw Posts: 13 Bronze 1
    Chris: The other assemblies are being run through SmartAssembly. Do they also have to have the usage reporting option configured in SmartAssembly? What do you mean by "direct dependency"? They are directly referenced by the main executable assembly.

    Daniel: Thanks for the information. That sounds like the way to go. In your SmartAssembly projects I assume you only turned on usage reporting for that one assembly, and not for the ones that are calling it to do reporting?
  • williamw wrote:
    In your SmartAssembly projects I assume you only turned on usage reporting for that one assembly, and not for the ones that are calling it to do reporting?

    Exactly. I have two different SA project files. One has usage and crash reporting on (which I use for only that "core" assembly) and the other one has only crash reporting on (which I use for everything else).
  • HaHeHaHe Posts: 1 New member
    So...I have several .dll:s which I need to collect feature usage. At the moment I have to make all of them a SA project file and they are separate feature usage information file. How can I get them into one report?  Can I make a "ReportFeatureUsage" -dll, make a method which using a parameter to pass feature usage information toReportUsageAttribute. But ReportUsageAttribute cannot be used like a method so I can't use it like ReportUsageAttribute(info string);
     
Sign In or Register to comment.