question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VisualStudio credential fails with Object reference not set to an instance of an object

See original GitHub issue
[Informational] Azure-Identity: VisualStudioCredential.GetToken was unable to retrieve an access token. Scopes: [ https://vault.azure.net/.default ] ParentRequestId: 09a26f89-ff23-4fca-8463-c20a1824836a Exception: Azure.Identity.CredentialUnavailableException (0x80131500): Process "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\Extensions\jzg2mnem.m2i\TokenService\Microsoft.Asal.TokenService.exe" has failed with unexpected error: TS003: Error, Object reference not set to an instance of an object..
 ---> System.InvalidOperationException (0x80131509): TS003: Error, Object reference not set to an instance of an object.

cc @schaabs @christothes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
crmann1commented, Feb 9, 2021

Please look at the work around in the developer community post https://developercommunity2.visualstudio.com/t/Running-Azure-dependent-API-locally-fail/1330468

If you go to %localappdata%.IdentityService\AzureServiceAuth\tokenprovider.json and look in there, there is a path to an exe file. Beside the exe file is a .config file Edit the .config file in an administrator command prompt and add the following under the runtime tag.

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Microsoft.VisualStudio.Validation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-16.8.0.0" newVersion="16.8.0.0" />
  </dependentAssembly>
</assemblyBinding>

We are looking at correcting this in 16.9 preview 5

0reactions
MatthewSteeplescommented, Feb 9, 2021

I’m experiencing this as well. VS 16.9 preview 4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft Visual Studio Object Reference Not set to an ...
Microsoft Visual Studio Object Reference Not set to an instance of an object · Go to solution(or project) folder, rename(or delete) the hidden...
Read more >
Object reference not set to an instance of an object
A fix for this issue has been internally implemented and is being prepared for release. We'll update you once it becomes available for...
Read more >
VS2019 sign in to azure throws: "Object reference not set ...
Visual studio 2019 throws the error: "Object reference not set to an instance of an object." after sign in to azure. I created...
Read more >
visual studio 2019 c# wpf, "object reference not set to an ...
The message "object reference not set to an instance of an object" (NullReferenceException) means that you are referring to an object the does ......
Read more >
Solved: controller.Execute error - Object reference not se...
I get the Object reference not set to an instance of an object (shows line number of catch (Exception ex) when the controller.Execute()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found