Why doesn't Visual Studio update folders when I click the Update Explorer button?

In Visual Studio 2008, I can see all of my project files in my Solution Explorer, and these files exist in a real story.

However, if I add a file to this directory (say, the test.sqlite file in the App_Data folder or, say, images created by some other program), then these files will NOT be displayed in my solution explorer even if I click the update button.

How to create files created by other applications in Solution Explorer?

(so far I have to create them somewhere else, and then copy and paste them into the solution editor itself, but there should be an easier way).




Edit:

Are there any advantages to this β€œfake solution”, i.e. I could have the file "test.sqlite" in my App_Data directory, but in my solution it could appear in my root directory. Based on the thinking of the Eclipse WYSIWYG Solution Explorer, I do not see the benefits of having this extra virtual meta information about the actual files in your directory. Is there a way to take advantage of this metaphor?

+46
visual-studio solution-explorer
Jan 23 '09 at 9:10
source share
2 answers

At the top of the explorer solution is a switch button "Show all files", so it includes all the files on the display, even if they are not included in the project. Icons for them will be highlighted a little. Then simply use the context menu to add them to the project.

+98
Jan 23 '09 at 9:25
source share

In the solution, right-click and select "Add Existing Item" and select a file from the solution root directory. Now the solution will receive the Solution Elements directory, which contains your file. This directory is virtual, so it does not exist on disk.

However, there is no such function as "Show all files" for the solution, this only works with projects.

+7
Jan 23 '09 at 9:15
source share



All Articles