VS2010 Changing the Add Item Directory

Is there a way to change the default directory that Visual Studio 2010 uses when you add the source file via Add → New Item?

+6
source share
4 answers

Since my comment seems to be the actual answer, I repeat:

On the toolbar of the Solution Explorer there is a button "Show all files" (or similar, I use the German version). This switches the view to directories, not filters. In this view, you can right-click on the desired destination folder to add items.

This does not actually change the default directory, but since you have to click somewhere anyway to add an item, this is the easiest approach.

Note that even when using Visual C ++, I would recommend the Power Tools extension that ships with Solution Navigator. In C ++, this is not as strong as with .NET, but it still has several functions that are useful in C ++ and can completely replace Solution Explorer.

+3
source

Add New Item simply adds an item based on the project directory you are currently in or selected in the solution explorer. If you want to change where it will be added, first select the target location in Solution Explorer.

This behavior is obvious when you right-click in the solution explorer, but when using Project -> Add New Item... it is also the same.

+3
source

Try using tools -> options -> Project and solutions.

0
source

I know this post is old ... but maybe someone will stumble upon it ... as I did today ...

I had the same "problem":

I have a dedicated directory for icons.

When I need to add an icon to a resource file, Visual studio will lead me to "C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ Common7 \ IDE"

To fix the problem, after I “browsed” the desired folder, I right-clicked the favorites of the “open file” dialog box and selected “add current location to favorites”.

The next time you get this dialog box, you just need to find the folder in your favorites and click on it.

0
source

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


All Articles