Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio error : Collection was modified; enumeration operation may not execute

I have a large solution with many C++ projects in Visual Studio 2015. When I load the solution, certain projects consistently fail to load. Typically they are plain old static C++ library projects.

In the output window of VS " Collection was modified; enumeration operation may not execute."

And in the solution window it shows the project is unloaded. If I reload just that project using right click context menu in the solution window the project just reloads without error.

How can I sort this out?

It is not clear what in the project file VS is having problems with. I have not been able to find better or more detailed logs. It only happens when I open the solution and only for certain projects.

like image 896
meissnersd Avatar asked Jun 14 '17 16:06

meissnersd


1 Answers

So following a suggestion from the msdn forum, I deleted two directories that make up the local Visual Studio cache. That resolved the issue for me.

.vs in the solution directory
C:\Users\<My user name>\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache\
like image 146
meissnersd Avatar answered Oct 25 '22 06:10

meissnersd