user2818430
user2818430

Reputation: 6029

Visual Studio - Exclude from solution large folder

How can I exclude from VS solution explorer an extremely large folder? If I right click and select exclude from project then VS crashes. How can I do it manually?

Upvotes: 1

Views: 1100

Answers (1)

Bob Z
Bob Z

Reputation: 23

I had this issue with VS2015 while trying to exclude a large folder with 2000+ files. The IDE became unresponsive / hang.

Solution : Close the solution. Manually edit the .PROJ file and delete the file entries. Lines like Compile Include="Folder\FileName.cs".


Details:

Turns out FOR EVERY FILE being excluded, it was scanning [C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tool\Rule Sets\ManagedMinimumRules.ruleset], and reading all the DLL files being referenced by the project, once.

Renaming the FXCop / Static Analysis folders makes no difference to speed.

Using SysInternals Process Monitor, it takes around 0.3 seconds for each file to be excluded. So excluding 2000 files took about 10 minutes, which was excatly when VS IDE became responsive again.

On the other hand, INCLUDING the same folder into the solution only takes 8 secs.

Upvotes: 1

Related Questions