Red Gate forums :: View topic - Feature/Exc Reporting SA dlls to be included in installer?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

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

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
smuda



Joined: 08 Jan 2012
Posts: 18
Location: Sweden

PostPosted: Sun Jan 08, 2012 3:56 pm    Post subject: Feature/Exc Reporting SA dlls to be included in installer? Reply with quote

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
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Tue Jan 10, 2012 10:28 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
smuda



Joined: 08 Jan 2012
Posts: 18
Location: Sweden

PostPosted: Tue Jan 10, 2012 9:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Wed Jan 11, 2012 11:01 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Thu Jan 12, 2012 11:43 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
smuda



Joined: 08 Jan 2012
Posts: 18
Location: Sweden

PostPosted: Sun Jan 22, 2012 7:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group