In Solution Explorer, some of my designer files aren't under their main file


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
This isn't huge, it doesn't seem to have affected how the app runs, but I did a bit of reorganizing. I added a folder, moved my BOs into it. Most of the BO look fine, but 2 or 3 now have their designer files just in the main list, not under the main BO file. I.e. (FirstBO is as expected, SecondBO is not right, ThirdBO shows that the resx if fine, just the designer is whacked)



FirstBO.vb

FirstBO.Designer.vb

SecondBO.Designer.vb

SecondBO.vb

ThirdBO.Designer.vb

ThirdBO.vb

ThirdBO.resx





I've tried refreshing in Solution Explorer and I've tried restarting VS. Any ideas?
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I found the solution. I remembered about project files, found the vbproj file, and the problem files where all missing the tag. I fixed it and viola its looking good again.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I guess i removed the tag name... DependentUpon was missing
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, sometimes, if you move one of the files, and not both of them (generally, if you move the designer file first...) it will separate them and remove that DependentUpon attribute from the XML .vbproj file.  By the same token, if you ever need to split a class into more than just 2 files, say MyClass.vb, MyClass.Interfaces.vb, MyClass.Events.vb, MyClass.Designer.vb, etc, you can manually modify the .vbproj file and add the DependentUpon attribute to all of them and they will all show up under the MyClass.vb file.  Make organizing much nicer.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Thanks for the info. I was moving by just grabing the collapsed main files. Sounds like if I expand the files I want to move and then move them together I might have less tweaking of the vbproj file. I'm sure I'll be using your suggestion for organizing interfaces, events, etc. soon too BigGrin
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search