Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Forcing custom project items into custom filter

$
0
0

In our C++ project we use .props files to add configuration details of used external libraries. So a project using libraryXYZ would import (in all configurations) XYZ.props. This works well and the projects are easier to maintain and keep consistent.

Some of the .props file introduce new items to the project. Those are external files (mostly.dlls) that have to be copied into output directory during building. This copying is done by a build customization. And this works fine too. (Far better than copying in Post Build Step, mostly by being easier to maintain.)

The issue however is that those items show up in project just like that. Without any folder or whatever. What are the options to deal with it?

I can always sort those items in each and every project (its .filters file) separately. But it doesn't look like a nice option.

I would like to avoid making a filter based on file extension as the custom items may contain files of various extensions including ones that are already used in other filters.

Can it be done somehow from the .props file so that I could avoid having to apply anything manually to each and every project (or its.filters file) separately?

The only workaround I have for now is to add another fake item named (for example) "Dependencies" and then make every custom item dependent on that fake item. It will not look like folder/filter but will kind of act like one.


Adam Badura


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>