简体   繁体   中英

How do I see all of the "missing" files in a Visual Studio solution that need to be included in the projects?

I have a Visual Studio 2019 (16.4.2) solution with several projects and hundreds of subfolders that sometimes have files on disk that need to be "Included" in the projects. This most often occurs after Nuget upgrades of 3rd party CSS and JS libraries, but this may also include image and icon libraries that have been imported.

The most common occurrence is when a 3rd party library is upgraded via Nuget, it'll add new css, js, images, or other content files to disk (sometimes more than 100 new files in a single upgrade). But since I don't know they're there, after I deploy the upgrade via Devops, none of those new files will get deployed, which causes all sorts of obvious problems. Then I have to go back and open every folder and subfolder, manually locate the missing files, click "Include in Project" for each one, then re-deploy.

在此处输入图像描述

There has to be a better way.

I don't necessarily want to include all missing files, because there are some files--especially source control-related files--that should not be included in the projects and need to just be left on disk. So what I need is a way to see a list of all of the files that are on disk but not included in the projects , so I can choose which ones to include.

Also nice would be a warning by Nuget about new files being added, which is probably asking too much (even though this is a very obvious feature that Nuget should include without asking for it).

How do I see all of the “missing” files in a Visual Studio solution that need to be included in the projects?

Usually , you can click the menu Show All Files from the solution explorer(Before that, you need to click on the specific item to see the hidden file). In this way, you should check every project and select which part to import based on your need.

在此处输入图像描述

So what I need is a way to see a list of all of the files that are on disk but not included in the projects, so I can choose which ones to include.

I am afraid that you cannot get what you want so far.

In VS IDE , there is no such function to obtain a list of all exclude files in your solution and then select which to import by default.

Also, there is no such vs extension to implement it.

So you should check every project and manually select the file to import by Show All Files Button.

Suggestion

If you still want this feature in VS IDE, you could suggest a feature on ourUser Voice Forum .

After that, you can share the link here with us and anyone who is interested in it including us will vote it to get more Microsoft's attention.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM