Feature usage reporting with multiple assemblies

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Feature usage reporting with multiple assemblies

Postby williamw » Fri Jun 14, 2013 4:35 pm

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?
williamw
 
Posts: 8
Joined: Mon Apr 02, 2012 2:19 pm

Postby Chris.Allen » Mon Jun 17, 2013 2:42 pm

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
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby DanielRose » Tue Jun 18, 2013 10:01 am

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.
DanielRose
 
Posts: 16
Joined: Fri Oct 30, 2009 9:29 am
Location: Aachen, Germany

Postby williamw » Tue Jun 18, 2013 12:07 pm

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
 
Posts: 8
Joined: Mon Apr 02, 2012 2:19 pm

Re:

Postby DanielRose » Tue Jun 18, 2013 1:19 pm

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).
DanielRose
 
Posts: 16
Joined: Fri Oct 30, 2009 9:29 am
Location: Aachen, Germany


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 2 guests