.designer.vb no longer "linked" to form

M

mr_doles

I am using vb.net 2005. In my explorer window I have a form called
mail.vb linked to it are two other files mail.resx and
mail.designer.vb. I created a new folder in the solution explorer
called forms and dragged the mail.vb (with view all files off) along
with three other forms into that folder. All the forms are fine except
for the mail form. The form is blank due to the .designer.vb is no
longer "linked" to mail.vb. It no longer has an arrow symbol on the
file instead it has a VB on it. I have tried dragging this file onto
the mail.vb file but it just says that "destination folder is the same
as the source folder". How can I "link" the designer back with the
main form.vb.

FYI the program runs fine but I can make any changes to the form now
since it is blank.

Please Help
 
M

mr_doles

Finally found the one line of code that needed to be added to fix this
problem. I will share in case this happens to anyone else. The
..vbproj file needs to be modified. I found this line:

<Compile Include="forms\mail.Designer.vb">
</Compile>

which needed to be changed to include
<DependentUpon>mail.vb</DependentUpon> like so:

<Compile Include="forms\mail.Designer.vb">
<DependentUpon>mail.vb</DependentUpon>
</Compile>

Don't know why it lost this line but that fixed it!!!!
 

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