none
VS2015 Issues - Hanging, unable to exit, and more

    Question

  • I've started using Visual Studio 2015 at work (after using VS2013). After a few nuget package upgrades, everything seemed good to go. However, I'm having some general issues that I can't seem to figure out. /safemode didn't seem to solve the issue, so I don't think it's related to extensions. I've also tried full reinstall to no avail.

     

    Here are the issues I'm seeing:

     

    - Unable to close VS or the solution. What pops up when hitting the close button is "Visual Studio has encountered an unexpected error". I have to kill devenv from Task manager.

     

    - When closing VS, the window sometimes is the only thing that closes. I can still see devenv.exe running through Task Manager.

     

    - Unable to search the solution using Solution Explorer. Nothing seems to show up for files I know exist. Search does work maybe once out of every five uses. The Solution Explorer only seems to index file names as well, not functions.

    How should I being going about debugging these issues, specifically the "unexpected error" one (I suspect if I solve that issue, many of my issues will go away)? Is there any place where I would find information on the "unexpected error"? Thanks for any and all help!

    Tuesday, March 08, 2016 7:21 PM

Answers

  • Follow-up: it seems like these issues were VS2015 Update 1 bugs. I've recently installed Update 2 RC and, in the short time I've been using it, I haven't hit any of the issues I've described. At the very least, it's decreased the prevalence of the issues, so I'm much happier now. Thanks for the assistance!
    Friday, March 25, 2016 3:52 PM

All replies

  • Hi Brian Heuston,

    Please check the ActiveLog.xml under the path of %AppData%\Microsoft\VisualStudio\14.0. This file will log all operations when you operate Visual Studio. Whether there has any error information about Visual Studio closed.

    And you also can check the Windows Event View to get more information about Visual Studio operations.

    Then please try debug Visual Studio itself with below steps.

    1. Start Visual Studio 2015. This will be the “debugger”.
    2. Choose File->Open Project    C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe
    3. Hit F5 to start Visual Studio itself. You can do any operations in the debugged devenv.exe and when there has exceptions thrown, you get catch them in the "debugger" Visual Studio.

    In addition, Visual Studio 2015 Update 1 has released, please install it from below link to check whether it will fix some issues.

    https://www.microsoft.com/en-US/download/details.aspx?id=49989

    Best Regards,
    Weiwei

    Wednesday, March 09, 2016 7:38 AM
    Moderator
  • Thanks for that advice. 

    The ActivityLog.xml file didn't really have anything terribly relevant, had an entry from March 2nd:

    <entry>
        <record>62</record>
        <time>2016/03/02 05:51:13.460</time>
        <type>Error</type>
        <source>VisualStudio</source>
        <description>CreateInstance failed for package [ResourceManagerPackage][Could not load file or assembly &apos;Microsoft.VisualStudio.Azure.ResourceManager.Contracts.1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.]:{   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)}</description>
        <guid>{7C6A3AE5-F469-4D51-B52D-50393DEC9432}</guid>
        <hr>80070002</hr>
        <errorinfo>Could not load file or assembly 'Microsoft.VisualStudio.Azure.ResourceManager.Contracts.1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
      </entry>


    I also have a dump of the devenv.exe process when I hit the close button after already hitting it once. The breaking callstack:

    00 0018dba0 1fc88d3c 0x4eab461b
    01 0018dbd0 7285177c 0x1fc88d3c
    02 0018dbf8 7294fe7b clr!COMToCLRDispatchHelper+0x6b
    03 0018dc50 02a4d060 clr!COMToCLRWorker+0x3fa
    04 0018dc7c 653d96ce 0x2a4d060
    05 0018dcd0 653d967b msenv!CCookieTable<ATL::CComPtr<IVsBroadcastMessageEvents>,DefaultCookieTraits<unsigned long,1,1431655765,0,1>,DefaultValueTraits<ATL::CComPtr<IVsBroadcastMessageEvents> > >::for_each<<lambda_6b0be0e775b458f9b44bc3b95d866468> >+0x47
    06 0018dd00 653d979f msenv!CVsShell::NotifyOnBroadcastMessage+0x37
    07 0018e158 653d1122 msenv!FnwpMainFilter+0x2a7
    08 0018e174 76a984f3 msenv!CAppManagementWindow::WndProc+0x1e
    09 0018e1a0 76a76c40 USER32!_InternalCallWinProc+0x2b
    0a 0018e248 76a76820 USER32!UserCallWinProcCheckWow+0x1f0
    0b 0018e2a8 76a7d169 USER32!DispatchClientMessage+0xf0
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll - 
    0c 0018e2e8 77848e56 USER32!__fnDWORD+0x49
    0d 0018e354 76a7cd7f ntdll_777d0000!KiUserCallbackDispatcher+0x36
    0e 0018e38c 5ff91118 USER32!PeekMessageW+0x16f
    0f 0018e3b0 654920a7 VSLog!VSResponsiveness::Detours::DetourPeekMessageW+0x30
    10 0018e3f8 652e8a3d msenv!CMsoCMHandler::EnvironmentMsgLoop+0x48
    11 0018e420 652e8993 msenv!CMsoCMHandler::FPushMessageLoop+0x105
    12 0018e460 652e88d7 msenv!SCM::FPushMessageLoop+0xb9
    13 0018e480 5af552b3 msenv!SCM_MsoCompMgr::FPushMessageLoop+0x2a
    14 0018e4f0 5af550ff 0x5af552b3
    15 0018e508 5af54f3e 0x5af550ff
    16 0018e550 5af54731 0x5af54f3e
    17 0018e57c 5af543f5 0x5af54731
    18 0018e594 2a4d1d98 0x5af543f5
    19 0018e5b8 2a4d1c1d 0x2a4d1d98
    1a 0018e630 2a4d1add 0x2a4d1c1d
    1b 0018e644 42badc90 0x2a4d1add
    1c 0018e654 42badc56 0x42badc90
    1d 0018e694 7285177c 0x42badc56
    1e 0018e6b8 7294fe7b clr!COMToCLRDispatchHelper+0x6b
    1f 0018e710 02a4d060 clr!COMToCLRWorker+0x3fa
    20 0018e73c 653210e2 0x2a4d060
    21 0018e780 6532104e msenv!CSolution::NotifySolutionEventsSinks<<lambda_5c3da8311da0dc13fa42d1087f7c8f33> >+0x50
    22 0018e798 65320f62 msenv!CSolution::NotifyOnBeforeCloseProject+0x22
    23 0018e7cc 65320964 msenv!CProject::Close+0xbe
    24 0018e7f0 653209b5 msenv!CSolution::RemoveProjectByCProject+0xc9
    25 0018e80c 6531f8f9 msenv!CSolution::RemoveProjectByHierarchy+0x28
    26 0018e868 655b5dfe msenv!CSolution::CloseSolutionElement+0x382
    27 0018e894 65323092 msenv!CSolutionItemsProject::CloseChildren+0x91
    28 0018e8c4 65320964 msenv!CProject::Close+0xe3
    29 0018e8e8 653209b5 msenv!CSolution::RemoveProjectByCProject+0xc9
    2a 0018e904 6531f8f9 msenv!CSolution::RemoveProjectByHierarchy+0x28
    2b 0018e960 6531f99f msenv!CSolution::CloseSolutionElement+0x382
    2c 0018e998 6531f326 msenv!CSolution::ClearProjectsInternal+0x7d
    2d 0018ea2c 6531dd23 msenv!CSolution::Clear+0xc1
    2e 0018ece0 6530b3b4 msenv!CSolution::Close+0x4fd
    2f 0018ed30 6530a958 msenv!_MainCanClose+0x2e0
    30 0018ee38 652f5022 msenv!HrShellExec+0x231
    31 0018eeac 6530aa4f msenv!CVSCommandTarget::ExecCmd+0x5c2
    32 0018eefc 6530ab4b msenv!CVSCommandTarget::Exec+0x84
    33 0018ef48 6530aa91 msenv!CAppManagementWindow::HandleDispatchCommand+0xdf
    34 0018ef70 6530ab87 msenv!CAppManagementWindow::HandleDispatchCommand+0x27
    35 0018ef80 76a984f3 msenv!CAppManagementWindow::WndProc+0x77
    36 0018efac 76a76c40 USER32!_InternalCallWinProc+0x2b
    37 0018f054 76a76541 USER32!UserCallWinProcCheckWow+0x1f0
    38 0018f0c0 76a76300 USER32!DispatchMessageWorker+0x231
    39 0018f0cc 65491f71 USER32!DispatchMessageW+0x10
    3a 0018f0e4 654920e9 msenv!MainMessageLoop::ProcessMessage+0xc6
    3b 0018f11c 652e8a3d msenv!CMsoCMHandler::EnvironmentMsgLoop+0xde
    3c 0018f144 652e8993 msenv!CMsoCMHandler::FPushMessageLoop+0x105
    3d 0018f184 652e88d7 msenv!SCM::FPushMessageLoop+0xb9
    3e 0018f1a4 5af552b3 msenv!SCM_MsoCompMgr::FPushMessageLoop+0x2a
    3f 0018f214 5af550ff 0x5af552b3
    40 0018f22c 5af54f3e 0x5af550ff
    41 0018f274 5af54731 0x5af54f3e
    42 0018f2a0 5af543f5 0x5af54731
    43 0018f2b8 5af47b5b 0x5af543f5
    44 0018f360 5af473d5 0x5af47b5b
    45 0018f374 02a4d28b 0x5af473d5
    46 0018f3a8 2c84baa4 0x2a4d28b
    47 0018f3bc 2c84ba12 0x2c84baa4
    48 0018f408 2c84b90e 0x2c84ba12
    49 0018f430 72851739 0x2c84b90e
    4a 0018f49c 02a4d060 clr!COMToCLRDispatchHelper+0x28
    4b 0018f4c8 654927b3 0x2a4d060
    4c 0018f4f8 6549290a msenv!SCM::FDoIdleLoop+0x122
    4d 0018f51c 6549299e msenv!SCM::FDoIdle+0xd2
    4e 0018f528 6549296d msenv!SCM_MsoStdCompMgr::FDoIdle+0x11
    4f 0018f54c 65492620 msenv!MainMessageLoop::DoIdle+0x1a
    50 0018f580 652e8a3d msenv!CMsoCMHandler::EnvironmentMsgLoop+0x125
    51 0018f5a8 652e8993 msenv!CMsoCMHandler::FPushMessageLoop+0x105
    52 0018f5e8 652e88d7 msenv!SCM::FPushMessageLoop+0xb9
    53 0018f608 652e889e msenv!SCM_MsoCompMgr::FPushMessageLoop+0x2a
    54 0018f634 652e87f0 msenv!CMsoComponent::PushMsgLoop+0x2e
    55 0018f6c8 65346ac3 msenv!VStudioMainLogged+0x5bd
    56 0018f6f0 2f2ba2b6 msenv!VStudioMain+0x7c
    57 0018f730 2f2b9db1 devenv!util_CallVsMain+0xde
    58 0018fa08 2f2c3b2f devenv!CDevEnvAppId::Run+0xbad
    59 0018fa30 2f2c3c4f devenv!WinMain+0xbd
    5a 0018fa7c 76bc38f4 devenv!__scrt_common_main_seh+0xfd
    5b 0018fa90 77835de3 KERNEL32!BaseThreadInitThunk+0x24
    5c 0018fad8 77835dae ntdll_777d0000!RtlUnicodeStringToInteger+0x253
    5d 0018fae8 00000000 ntdll_777d0000!RtlUnicodeStringToInteger+0x21e

    Eventually hit a CLR exception:

    devenv.exe Error: 0 : Error while closing the websocket: System.Net.WebSockets.WebSocketException (0x80004005): An internal WebSocket error occurred. Please see the innerException, if present, for more details.  ---> System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
       at System.Net.WebSockets.WebSocketConnectionStream.WebSocketConnection.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.Net.DelegatedStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.Net.WebSockets.WebSocketConnectionStream.<>n__1(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
       at System.Net.WebSockets.WebSocketConnectionStream.<WriteAsync>d__22.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Net.WebSockets.WebSocketBase.<SendFrameAsync>d__48.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at System.Net.WebSockets.WebSocketBase.WebSocketOperation.<Process>d__19.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Net.WebSockets.WebSocketBase.<CloseOutputAsyncCore>d__51.MoveNext()
       at System.Net.WebSockets.WebSocketBase.ThrowIfConvertibleException(String methodName, Exception exception, CancellationToken cancellationToken, Boolean aborted)
       at System.Net.WebSockets.WebSocketBase.<CloseOutputAsyncCore>d__51.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.<<CloseAsync>b__6>d__8.MoveNext()

    Seems like it might be trying to hit this API:

    [https://app.vsspsext.visualstudio.com/_apis/Profile/Profiles/me/Attributes?partition=VisualStudio.14_PreferredProfile&withcoreattributes=true&coreattributes=Minimal%2CEmail%2CAvatar%2CDisplayName%2CAll&modifiedafterrevision=500403] (GET)Attributes[Profile]

    I can provide the user mini dump if necessary. I'm gonna start searching around for stuff pertaining to these errors. I might also try and clear my profile for VS 2015 to see if that fixes things.

    Wednesday, March 09, 2016 11:29 PM
  • Hi Brian Heuston,

    According to error in Activity.log, it seams related to Azure SDK. I suggest you check whether there has a update for this SDK in your Visual Studio Notification.

    If has updated and the problem still exist, please try uninstall it to make sure whether the problem caused by this SDK.

    If any other new discovery after your searching and clear your profile for VS2015, please feel free to let me know.

    Best Regards,
    Weiwei

    Thursday, March 10, 2016 2:32 AM
    Moderator
  • Follow-up: it seems like these issues were VS2015 Update 1 bugs. I've recently installed Update 2 RC and, in the short time I've been using it, I haven't hit any of the issues I've described. At the very least, it's decreased the prevalence of the issues, so I'm much happier now. Thanks for the assistance!
    Friday, March 25, 2016 3:52 PM
  • Delete all Files from this directory  :\..\..\..\AppData\Roaming\Microsoft\VisualStudio.and do clean Cache will solve the problem. 


    • Edited by DevRahul Saturday, May 14, 2016 11:25 AM
    Saturday, May 14, 2016 11:25 AM