How to make the Visual Studio compiler ignore a file?

前端 未结 4 725
死守一世寂寞
死守一世寂寞 2020-12-16 01:39

Is anyone aware of a way to make visual studio completely ignore a file when compiling? I have a C# solution that has a foo.config file that isn\'t really a standard config

4条回答
  •  青春惊慌失措
    2020-12-16 02:29

    Just right click on the file and choose "Exclude from project".

    If you still want to see it in your project, select the project and click the "Show all files" button at the top of the solution explorer. This will show all the files in the directory tree even if they aren't actually part of the project.

提交回复
热议问题