none
Visual Studio 2015 crashes with Azure Data Lake extension

    Question

  • Hi all,

    I'm working on a U-SQL project and have been struggling all week to make data lake tools work with Visual Studio 2015. Had to revert back to Visual Studio 2013... but then, with VS 2013 even if it does not crash, I can't log in to Azure subscription from Server Explorer.

    Anyways... this post is about Visual Studio 2015 and Data Lake Tools. Tried everything, even reinstalling. However, the problem keeps coming back after a while. As a side note, another symptom is that, even if VS Starts, the "submit" button is unavailable from the U-SQL script window.

    I ran "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" /log and here's what I found at the end

    2409 ERROR Unexpected exception Could not load type 'Microsoft.VisualStudio.Services.Client.Keychain.SessionTokenDescriptor' from assembly 'Microsoft.VisualStudio.Services.Client, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.    at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.BaseUserContext.<GetProfileSessionTokenCredentialsAsync>d__56.MoveNext()   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.BaseUserContext.GetProfileSessionTokenCredentialsAsync(Boolean forceRefresh, CancellationToken cancellationToken)   at Microsoft.VisualStudio.Shell.Connected.ConnectedUser.BaseUserContext.<CreateCredentialsAsync>d__54.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.VisualStudio.Shell.Connected.ConnectedUser.BaseUserSession.<ConnectAsyncImpl>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 Microsoft.VisualStudio.Shell.Connected.ConnectedUser.BaseUserSession.<ConnectAsync>d__37.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.VisualStudio.Shell.Connected.ConnectedUser.BaseUserSession.<PollConnectAsync>d__49.MoveNext() for IdeUser

    Any help would be greatly appreciated. I ran out of ideas...

    Wednesday, June 1, 2016 2:07 PM

Answers

  • Hi Amihanov,

    It's not something wrong with your PC.  It's a conflict between Data Lake and some other plugin using different versions of that same dll.  You should be able to rename/delete the one in the Data Lake Tools folder (leave the other one alone), and I believe the problem will go away if you hit it.  What happens in the working case is it loads the dll from the other directory first.  In the conflicting case, it loads it from the Data Lake folder first.  The one it loads depends on which one is started first. 

    Thursday, June 2, 2016 4:58 AM

All replies

  • Hi Amihanov,

    I'm sorry you hit this.  We found that this seems to be affecting some users on VS 2015 Update 2.  Could you try to go to

    C:\Program Files (x86)\Microsoft Visual Studio
    14.0\Common7\IDE\Extensions\Microsoft\Microsoft Azure Data Lake DRI Tools for
    Visual Studio 2015\2.0.7000.0

    and try to delete Microsoft.VisualStudio.Services.Client.dll from that directory?

    For VS 2013, what happens when you try to log in?  Server Explorer doesn't support some of the Azure subscriptions, but there's extra logic under the Data Lake node to handle those cases.  If you right click the Azure icon, and pick Manage subscriptions, do you see the account you want logged in and have it selected?  After that, does expanding the Data Lake icon show the subscription?

    Thursday, June 2, 2016 2:45 AM
  • Hi Yifung! thanks for replying. Just so you know I'm a consultant at Microsoft so I'm also asking this internally.

    To answer your question, if I rename the dll Visual Studio shows a horrible red error and hangs. However, read below.

    I opened Process Explorer an pointed to devenv.dll to see where was the dll coming from, and it turns out it was loading it from c:\Program Files (x86)\Microsoft Visual Studio
    14.0\Common7\IDE\Extensions\Microsoft\Microsoft Azure Data Lake Tools for
    Visual Studio 2015\2.0.8000.0
    \Microsoft.VisualStudio.Services.Client.dll. Version 14.0.23019.0

    That didn’t tell me much at the time, so I decided to remove every Visual Studio version from my notebook and install everything back from scratch using Web Platform Installer. I installed both VS 2013 and VS 2015 in “one shot” along with Microsoft Azure SDKs and Data Lake Tools. Now everything is working fine on my notebook, however I’m not sure when or If will it break again. What I’m observing now with Process Explorer is that in this “good” install, Visual Studio is loading Microsoft.VisualStudio.Services.Client.dll from a different place: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\n44ujadd.j4i\Microsoft.VisualStudio.Services.Client.dll. Also, it’s a newer version 14.95.25118.0

    I was having a similar issue at a Windows 7 PC at customers and I will repeat my uninstall / reinstall procedure. I’m even planning to uninstall every program with the word “Azure” in it before attempting re-install (because I don’t have any better ideas). However, this will take a lot of time. If the problem repeats after reinstall, then I know I will need to do something different. But I have no idea what… and I would like to leave a well documented (And correct) setup process for customer so that he does not run into these issues.

    So my question is: How dit I get the problem in the first place (in both the Windows 7 PC and my Windows 10 PC) ?. Why would Visual Studio go and try to load the dll from the Data Lake tools folder ??. The error was exactly the same in both PCs. Also, another weird symptom is that after several installs and reinstalls of only the data lake tools, at one point I could no longer see the “Submit” button on the USQL scripts.

    Thursday, June 2, 2016 3:26 AM
  • Hi Amihanov,

    It's not something wrong with your PC.  It's a conflict between Data Lake and some other plugin using different versions of that same dll.  You should be able to rename/delete the one in the Data Lake Tools folder (leave the other one alone), and I believe the problem will go away if you hit it.  What happens in the working case is it loads the dll from the other directory first.  In the conflicting case, it loads it from the Data Lake folder first.  The one it loads depends on which one is started first. 

    Thursday, June 2, 2016 4:58 AM
  • Wow. Shockingly. Everything was working allright. I rebooted the PC and the issue came back: Visual Studio 2015 crash....

    But you were absolutely right. Just renaming the dll from Data lake folder solved the problem. I now know what to do. But Stay tuned because there's another issue I think I will find in the Windows 7 PC. Will report it back here.

    Thank you very much!

    Thursday, June 2, 2016 3:53 PM