Bizarre error editing forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Craig Graham

    #1

    Bizarre error editing forms

    Don't know which newsgroup this is most suited to.

    I have a VB.NET app that has been under development for a few months. I have
    edited some of the Designer-generated code, to replace some controls with my
    own classes that inherit from the original- but this was quite some time ago
    and I've had no problem so far.

    This morning I came to edit a form for the first time in a couple of weeks
    and got the error

    "An error occurred while loading the document. Fix the error, and then try
    loading the document again. The error message follows:
    Exception from HRESULT: 0x80131019"

    A bit of exploration, including reverting the project file to an earlier
    revision in case of corruption, reveals that the problem is down to a little
    DLL I wrote in C++. If I reference this DLL in my project, even without it
    being used in any forms, I am unable to edit any form. Remove the reference,
    I can edit again. Put the reference back, the error messages return. I don't
    even have to close and reopen the project to see the change. With or without
    the reference I can build and run the application fine- the bits of code
    that use it are of course commented out in these tests.

    I'm using a vanilla .Net Pro 2002. Has anyone the foggiest what is going on?

    --
    Dr. Craig Graham, Software Engineer
    Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/



  • Craig Graham

    #2
    Re: Bizarre error editing forms

    Craig Graham wrote:
    [color=blue]
    > "An error occurred while loading the document. Fix the error, and
    > then try loading the document again. The error message follows:
    > Exception from HRESULT: 0x80131019"[/color]

    Ah.

    Just found "Copy Local" in the properties of the reference. Don't know why,
    but setting it "false" makes the problem go away. Much easier than
    adding/removing the reference as needed!

    Anyone know why simply asking it to make a copy of the DLL in the build
    directory breaks the form designer?

    --
    Dr. Craig Graham, Software Engineer
    Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/



    Comment

    Working...