Bizarre error editing forms

C

Craig Graham

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?
 
C

Craig Graham

Craig said:
"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"

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top