Problem with SDK

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, Alex.Davies, melvyn.harbour

Problem with SDK

Postby Eaton » Mon Jun 21, 2010 5:51 am

To make a long story short, I was fiddling with your SDK and trying to make a new UI for the exception reporter. It was going well until I actually tested it. It would apparently throw an exception in the InitializeComponent(); method and basically crash the error reporter.

So, after some long hours of debugging using message boxes, I found the problem line:
Code: Select all
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExceptionReportingForm));


resources is used to grab some text for some controls and such like this:

Code: Select all
this.TellMessageLabel.Text = resources.GetString("TellMessageLabel.Text");


I tried setting the text manually, but it just reset when I viewed the designer again.

Any idea why it is crashing when it tries to initialize that resource manager?
Eaton
 
Posts: 16
Joined: Tue May 18, 2010 4:20 am

Postby Paul.Martin » Fri Jun 25, 2010 3:39 pm

Sorry for taking a week to reply to this one, not quite sure how I missed it.

Did you start from one of the samples and edit the forms from there or did you start from scratch?

I know when I was having a play around with the samples I had a similar problem, but for that as soon as I added a resource in the Visual Studio (2010) designer everything worked.
The samples are designed for compatibility with all framework versions so the forms do not have individual resource files (they became standard in VS 2005 with the partial classes allowing forms to be kept in 3 seperate files).

If the individual resource file for the form hasn't been created by Visual Studio (or yourself), then the call to
Code: Select all
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExceptionReportingForm));

will fail as the ResourceManager will start off trying to resolve the ExceptionReportingForm.resource namespace.
Paul.Martin
 
Posts: 83
Joined: Wed Feb 03, 2010 11:20 am
Location: Cambridgeshire

Postby Eaton » Fri Jun 25, 2010 5:20 pm

I am customizing the error reporter here: C:\\Program Files\\Red Gate\\SmartAssembly 5\\SDK\\Exception Reporting\\3 Custom UI

Using DevExpress components. And yes, to make it cleaner, I put all the the initialization stuff in the Designer.cs, which I had to create.

But I will try to add a resource and see if it works.
Eaton
 
Posts: 16
Joined: Tue May 18, 2010 4:20 am


Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 1 guest