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

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

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

    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
  • Jack Jackson

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

    On Wed, 6 Aug 2008 14:58:20 -0700 (PDT), Alex <samalex@gmail. com>
    wrote:
    >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="ctlPro gressBar.Design er.vb">
    <DependentUpon> ctlProgressBar. vb</DependentUpon>
    </Compile>
    <Compile Include="ctlPro gressBar.vb">
    <SubType>UserCo ntrol</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.

    Comment

    Working...