Quickly delete files in an installation project

I support the installation project under VS2008. A project contains thousands of files located in a folder hierarchy.

From time to time, I want to update part of this hierarchy, which means deleting multiple nodes and reinserting new content. I need to do this because some of the files are outdated and need to be deleted. It is much safer to delete everything except chase obsolete files.

Unfortunately, this is a very tedious task, because you cannot delete empty folders, and you need to delete each node in the hierarchy one by one. In addition, for a large project, each removal takes seconds.

Do you know how to speed up or automate this task? Simply deleting lines in a .vdproj file does not work.

+4
source share
1 answer

If you don't feel too nauseous ... It's worth the effort if the changes are frequent.

The .vcproj file is in xml format. You can use Explorer to manage your files and write a small utility that checks and removes (missing) files from your project. Files are tagged as in

<File
    RelativePath=".\AudioPlayerPane.cpp"
    >
</File>

You need to remove the entire "File" tag, 3 lines or more, if the file has special compilation options, etc. all the way to the "/ File" tag. In addition, you will want to delete the .suo, .ncb, and .cache files.

, boost.property_tree xml - , UTF-8, , vcproj. . , notepad ++ .

0

Source: https://habr.com/ru/post/1669969/


All Articles