Moved .vb files into folders via VS, and now everything's a mess...

A

Alex

Hi Everyone,

To better organize my code I created to Folders in Visual Studio 2005,
one for Forms and one for Logic... then I moved the .vb files into
the appropriate folders. It worked great for all but two forms, which
now Visual Studio has unlinked the Designer.vb file, .resx file,
and .vb files. So now when I double-click on the .vb file for the
form, it's just blank.

How to I get VB to put these back together???

Thanks --

Alex
 
J

Jack Jackson

Hi Everyone,

To better organize my code I created to Folders in Visual Studio 2005,
one for Forms and one for Logic... then I moved the .vb files into
the appropriate folders. It worked great for all but two forms, which
now Visual Studio has unlinked the Designer.vb file, .resx file,
and .vb files. So now when I double-click on the .vb file for the
form, it's just blank.

How to I get VB to put these back together???

Thanks --

Alex

With VS closed, make a copy of the .vbproj file, then edit the .vbproj
file in a text editor like Notepad.

With properly linked files you will see something like:

<Compile Include="ctlProgressBar.Designer.vb">
<DependentUpon>ctlProgressBar.vb</DependentUpon>
</Compile>
<Compile Include="ctlProgressBar.vb">
<SubType>UserControl</SubType>
</Compile>

One of two things has happened to you. Either the designer file is no
longer part of the project, or it has become unlinked. For files that
have become unlinked, you need to add the DependentUpon clause.
 

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