Place files automatically in the / scripts folder in Visual Studio 2005

I created a bunch of filters in my project to help find files. But all my source code files really just come in two folders, source / headers ... filters are for Visual Studio organization only, but I wanted the directory structure to be easy to create in other compilers.

In any case, whenever I add a new element or class, the files go to the / scripts folder and I have to move them. Is there a specific project to change this, am I tired of doing this?

+3
source share
4 answers

"", . Filter, , ( include: h; hpp; hxx; hm; inl; inc)

, Scripts .

+1

, . , "" → " ". , . , .

0

visual studio 2005.

, , - , , CMake . , , , .

.

, , .

0

: ? VS / , ?

Perhaps you can automate the movement of your files using macros:

DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Activate()
DTE.ActiveWindow.Object.GetItem("{original filename including filter}").Select(vsUISelectionType.vsUISelectionTypeSelect)
DTE.ExecuteCommand("Edit.Cut")
DTE.ActiveWindow.Object.GetItem({target filter}).Select(vsUISelectionType.vsUISelectionTypeSelect)
DTE.ExecuteCommand("Edit.Paste")

Code like this can run when files are added: How to handle events using macros

0
source

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


All Articles