VS2013 crashing when I go to Team Explorer and click on 'Changes'

visual-studio, visual-studio-2013

Solution

Found out what was going on. This happens because my Windows Temp folder has more than 65535 files. Had to clean out my Temp folder (---\User\AppData\Local\Temp)

Found at:

System.IO.IOException: "The file exists" when using System.IO.Path.GetTempFileName() - resolutions?

I think this is not a duplicated problem. This targets VS2013 specifically.

Problem

my VS2013 installation never had any crashes but this week it started showing this error at startup: ``` An exception has been encountered. This may be caused by an extension. You can get more information by bexamining the file (...)\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml ``` Then it opens correctly and I can work normally. However, when I try to commit my local changes and open the Team Explorer and click on CHanges, Visual Studio crashes. I looked into the ActivityLog.xml and fount this error: ``` <entry> <record>179</record> <time>2015/02/27 17:51:35.065</time> <type>Error</type> <source>Editor or Editor Extension</source> <description>System.IO.IOException: The file exists.&#x000D;&#x000A;&#x000D;&#x000A; at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)&#x000D;&#x000A; at System.IO.__Error.WinIOError()&#x000D;&#x000A; at System.IO.Path.InternalGetTempFileName(Boolean checkHost)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.WpfHelper.LoadCursorDPIAware(Stream cursorStream)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.LeftSelectionMargin.get_RightArrowCursor()&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.LeftSelectionMarginProvider.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.&lt;AddMargins&gt;b__2(IWpfTextViewMarginProvider mp)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy`2 provider, Func`2 getter)</description> </entry> ``` I tried deleting all my projects, cloning them again and this persists. Can anyone help me figuring this out?

Original source

Related problems