Visual Studio 2012 does not show the folder was created

I use Microsoft Visual Studio 2012. First I opened my ASP.NET project, and then created a folder with pages, views, sources . But when I open the project, Visual Studio does not show these folders. I can’t view them. If I create a new folder with the same name as above, the IDE displays a message that the folder already exists.

Can you help me! Thank you very much!

+7
source share
12 answers

The Visual Studio project does not run a parallel file system. If you create a directory or add a file to the directory through Windows Explorer, it will not be displayed in Visual Studio. You must either create a file or folder inside Visual Studio, or use the Add... dialog for the project to add existing files.

+12
source

The easiest solution for me was to copy the files / directories from the project folder again and paste them again in the Visual Studio Solution Explorer panel.

Here it is!

Visual Studio automatically synchronizes Explorer with the Visual Studio file system.

+9
source

Yes, this is because Visual Studio needs all of its resources explicitly listed in the project files. When you add a folder to VS, it creates it on disk and modifies the project file, whereas if you added it to Explorer, the project file will not have any information about it.

The simplest solution that I find is, as a rule, renaming them in Explorer, adding them to Visual Studio, and then moving the contents from the source folder to a new one.

In addition, you can edit project files directly, but a little more advanced and dangerous. (It’s not that difficult, and it’s probably worth experimenting with if you created a “well-known” project file.)

+4
source

Folders should also be displayed in Visual Studio, sometimes they are hidden, so when you try to create a folder with the same name, this will not allow you to do this. So, all you need to see all the folders is explorer explorer and click the show all files button at the top of the window, after which you will see hidden folders that are in a different color, right-click on the folder and select include in project .

+4
source

Try using Show all files in Project Explorer, and then right-click on folders to add to the project.

Did you create folders in Windows Explorer? If not, your project file may be corrupted.

+3
source

Creating folders on disk does not necessarily mean that they will be displayed inside the project in Visual Studio, because projects maintain their own list of folders.

If you want your folders to appear inside the project, you need to create folders from Visual Studio (right-click the project and choose Add> New Folder).

+1
source

Select Project Name in Solution Explorer and click Show All Files. Then select the newly added folder or files (which are in the dotted structure) and right-click → select "Include in project".

Then it will add the newly created file to your local structure (which are shown in the normal structure).

+1
source

I think you're not just browsing the solution explorer. Select "View → Solution Explorer" from the menu bar. Otherwise, just press Ctrl + Alt + L. Then you can see the folders.

+1
source

You can drag the folder into your solution. and go to the subfolder (your folder and the subfolder that you want to move to the solution) and drag it into your folder, which you simply drag back. Visual studio will ask you that you want to overwrite the old one. Click "Yes", now "Visual Studio" will show you the whole file.

+1
source

The simplest and easiest solution I've found is to simply drag and drop your resources (your folder) from Windows Explorer onto the Explorer Explorer visual project

: R

0
source

Just go to the top of Solution Explorer, find the button with Show All Files and click on it. It will display all the files in the directories that you have in Solution Explorer.

0
source

It's late for the game, but since there is still a use case for adding files from outside of VS - for example, adding a lot of CSS & image files - for me the easiest way is to close the project in VS and then open it again.

(Using VS for Mac, v.8.)

-1
source

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


All Articles