Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I exclude files and folders from the build in Visual Studio 2017?

In some older versions you could easily right click on the folders and exclude from build.

This function seems to be gone in VS 2017 Community. How do I achieve the same?

Update: it seems the function is not completely gone, it's possible to exclude files from the project when the Solution Explorer is not in folder view. This is not a solution anyway, since I need to exclude a whole folder that's got plenty of files, excluding them one by one is not at all a practical solution. It's something I can do in an emergency scenario, but not a reliable way of doing it.

like image 662
Eärendil Baggins Avatar asked Sep 10 '25 23:09

Eärendil Baggins


1 Answers

Press right-click on the file you want to exclude, and click on properties. In General->Excluded from build, select Yes.

like image 161
machine_1 Avatar answered Sep 13 '25 13:09

machine_1