Error "oldIndex must be a valid index in the Children collection" when opening a source file in visual studio 2012

StackOverflow https://stackoverflow.com/questions/23639039

سؤال

I occasionally receive a modal popup window in Visual Studio 2012 with the following error:

oldIndex must be a valid index in the Children collection

Parameter name: oldIndex

Actual value was -1.

The only reference of that error I found was in this Resharper bugtracking thread, but I don't think it is related to Resharper. In my case it seems to happen after I start debugging and for some reason the debugger suddenly doesn't manage to find the source files, not even when "stepping into". Trying to open them manually fails, during debugging without any message, after I stop debugging, the above message appears.

I have not (yet) been able to reproduce this consistently. Still, I figured it warranted a question on SO in case others have seen it and/or have a possible solution. If I can reproduce it consistently, I should probably file a bugreport at Microsoft Connect.

Once this error pops up, soon no files at all open anymore, all raising the same error. Only after I restart Visual Studio, I can continue normal operation.

هل كانت مفيدة؟

المحلول

As per the suggestion of ekenman, I add the only answer so far that helped, but it is not a real answer in my opinion. If a proper answer comes up, I will accept that instead.

Solution: restart Visual Studio :(.

نصائح أخرى

Uninstalling Jetbrains Resharper worked for me in VS 2013 Professional.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top