| Author |
Message |
smuda
Joined: 08 Jan 2012 Posts: 18 Location: Sweden
|
Posted: Sun Jan 08, 2012 3:56 pm Post subject: Feature/Exc Reporting SA dlls to be included in installer? |
|
|
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 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Tue Jan 10, 2012 10:28 am Post subject: |
|
|
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/content/SmartAssembly/help/6.5/SA_Errors_DLLs _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
smuda
Joined: 08 Jan 2012 Posts: 18 Location: Sweden
|
Posted: Tue Jan 10, 2012 9:41 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Wed Jan 11, 2012 11:01 am Post subject: |
|
|
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6345 Location: Red Gate Software
|
Posted: Thu Jan 12, 2012 11:43 am Post subject: |
|
|
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
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
smuda
Joined: 08 Jan 2012 Posts: 18 Location: Sweden
|
Posted: Sun Jan 22, 2012 7:26 am Post subject: |
|
|
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/viewtopic.php?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 |
|
| Back to top |
|
 |
|