.designer.vb no longer "linked" to form

  • Thread starter Thread starter mr_doles
  • Start date Start date
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
 
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!!!!
 
Back
Top