Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2006

Tip: Looking for answers? Try searching our database.

How to find out what files belong to a project?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RedJoy - 13 Jul 2006 04:14 GMT
I am trying to "clean up" a solution with 10 projects and I was wondering if
there is a way to "traverse" the source files to find not only the #includes
but also remove #includes that are not needed for a file.

Signature

Thanks,

Michael S. Wells                    \|/
Software Engineer              ^O-O^                              
---------------------------o00o--(_)--o00o----------------------------

Bruno van Dooren - 14 Jul 2006 08:14 GMT
> I am trying to "clean up" a solution with 10 projects and I was wondering if
> there is a way to "traverse" the source files to find not only the #includes
> but also remove #includes that are not needed for a file.

There is no automatic way that I know of, but perhaps the following might
help.

You could use /showIncludes to show you which include files are used during
the compilation process.
Compare this against the list of all include files, and remove what is not
used anymore.

For knowing which sourcefiles are not used anymore, you could parse the
project files. they are XML.
compare that against the list of all available source files and you know
what can be removed.

If you are famailiar with a scripting language you could sort of automate
this process yourself.
you have to do a backup before you do this, obviously.

Signature

Kind regards,
   Bruno.
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"

Mihajlo Cvetanović - 14 Jul 2006 13:45 GMT
>>I am trying to "clean up" a solution with 10 projects and I was wondering if
>>there is a way to "traverse" the source files to find not only the #includes
[quoted text clipped - 7 lines]
> Compare this against the list of all include files, and remove what is not
> used anymore.

There is one small caveat. Some header files may belong to the project
under special conditions, and may or may not be #included depending on
some preprocessor macro. Even a source file may belong to a project, but
is left out in default configuration.

One safe way would be to manually traverse through vcproj file, and
gather all source files from it, then search through all source files
for #include "" (ignore #include <>) directives, then include all found
files in search list and repeat the search as long as the search list
expands. In the end the search list becomes the project list.

I can only guess there is a tool that does exactly this.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.