Problem with SDK

EatonEaton Posts: 19
edited June 25, 2010 12:20PM in SmartAssembly 5
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:
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExceptionReportingForm));

resources is used to grab some text for some controls and such like this:
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?


  • Paul.MartinPaul.Martin Posts: 83 New member
    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
    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.
  • 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.
Sign In or Register to comment.