Changing Git branches from the command line results in non-fatal Watsons and error reports
See original GitHub issueI don’t have a precise repro at this time, but here’s the stack. I feel like I’ve seen it the last two or three days while dogfooding internal builds, but it’s a newerish regression it feels like.
Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.DocumentLockedException (0x80070005): Operation canceled because the document 'F:\Projects\Roslyn\src\CodeStyle\Core\Tests\Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities.csproj' is locked by another component. Try opening the document to unlock.
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.DocumentManager.VerifyDocumentIsClosed(RunningDocumentTable runningDocuments, String itemPath)
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.DocumentManager.Close(SimpleHierarchyNode projectItem, __FRAMECLOSE closeFlag)
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.DocumentManager.CloseOrDetachDocument(SimpleHierarchyNode projectItem)
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.SimpleItemNode.CloseOrDetachDocument()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.RethrowOrAggregate(ICollection`1 exceptions)
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.SimpleItemNode.CloseOrDetachDocument()
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.TreeData.OnBeforeApplyTree()
at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.ApplyAsync(TreeData value)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>g__action|0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Switching branches results in spurious TypeScript errors
Running tsc from the command line never reports any errors. It seems like vscode isn't reloading files that aren't being actively edited ...
Read more >Git - git-switch Documentation
$ git switch mytopic error: You have local changes to 'frotz'; not switching branches. You can give the -m flag to the command,...
Read more >git switch branch without discarding local changes
When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch...
Read more >Git Branching Commands Explained with Examples
This tutorial walks you through a set of Git commands for creating, committing, merging, and deleting branches.
Read more >Git Branch | Atlassian Git Tutorial
This document is an in-depth review of the git branch command and a discussion of the overall Git branching model.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’ve figured out the cause and hoping to get a fix for the final build of 16.6.
PR: https://devdiv.visualstudio.com/DevDiv/_git/CPS/pullrequest/245482.