Feature/Exc Reporting SA dlls to be included in installer?

.NET obfuscator and automated error reporting

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

Feature/Exc Reporting SA dlls to be included in installer?

Postby smuda » Sun Jan 08, 2012 3:56 pm

Hi!

To be able to use Feature and/or Exception reporting the SA dlls seems to be required to redistribute, is that correct?

If they aren't included the SA unhandled exception handler shows up with "Could not load file or assembly 'SmartAssembly.ReportException, Version=6.0.0.0...' or one of its dependecies. The system cannot find the file specified.

The exception itself seems to be coming from one assemby that is only embedded, not merged. (and this i because a problem with de-serialization, which I'll post in a different thread)

Best Regards,

John
smuda
 
Posts: 18
Joined: Sun Jan 08, 2012 3:12 pm
Location: Sweden

Postby Brian Donahue » Tue Jan 10, 2012 10:28 am

SmartAssembly.ReportException does not need to be distributed with your assembly output. When the build takes place, all of the fuctionality should be added to the assembly during the build process.

Please see: http://www.red-gate.com/supportcenter/c ... rrors_DLLs
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby smuda » Tue Jan 10, 2012 9:41 pm

Have you tried this with embedded assemblies (not merged)? I can't get that to work without adding the SA assemblies to the directory.

When the ReportException get called from the embedded assembly, it failes with
"Could not load file or assembly 'SmartAssembly.ReportException, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7f465a1c156d4d57' or one of its dependencies. The system cannot find the file specified."

Best regards,

John
smuda
 
Posts: 18
Joined: Sun Jan 08, 2012 3:12 pm
Location: Sweden

Postby Brian Donahue » Wed Jan 11, 2012 11:01 am

I think I see now -- you are attempting to put error reporting in a DLL, then embed it into another assembly. If you use ReportException in a DLL, then you probably need to ship the ReportException DLL with your application because unless you use method 2 (add an entry point to the DLL), the embedding of the guts of the error reporting is not done.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Thu Jan 12, 2012 11:43 am

Hi, sorry the documentation about this is not very clear, so I had to go back and try it myself --

If you follow this procedure, the Report method should work without having to include the ReportException DLL.
  • Create a class library project including a method that calls Report() and compile it
  • Run SmartAssembly on the class library DLL, specifying error reporting and entering the project and company name
  • Create a console application, reference the "processed" version of the DLL and call the function in the DLL
  • Compile and run the console application, it will show an SA error dialog


If I had to guess, I'd say you forgot to enable error reporting when you processed the DLL.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am

Postby smuda » Sun Jan 22, 2012 7:26 am

I added more logging and realized the exception occurs during deserialization of an object. I have (with your help) solved the issue:
http://www.red-gate.com/messageboard/vi ... hp?t=14511

which means I can now merge the deseralization issue into the main assembly and this problem goes away.

Thanks for your help!

Best Regards,

John
smuda
 
Posts: 18
Joined: Sun Jan 08, 2012 3:12 pm
Location: Sweden


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests

cron