Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproduce 16.7 Visual Studio issue #588

Closed
wants to merge 1 commit into from
Closed

Conversation

GrahamTheCoder
Copy link
Member

@GrahamTheCoder GrahamTheCoder commented Jul 4, 2020

Not a real PR - just a place to keep the cut down repro for #586

Repro steps:

  • Launch Visual Studio 16.7.0 preview 3.1 or later with this branch's extension installed (either install the CI build, or launch the VSIX project from source)
  • Create a new visual basic .net framework console project.
  • Right click on a .vb file in the solution explorer
  • Click "Convert to C#"

It will reasonably directly invoke the code added on this branch, and throw a very odd exception attempting to rename a namespace.

StreamJsonRpc.RemoteInvocationException : Unexpected false
   at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
   at async Microsoft.CodeAnalysis.Remote.RemoteEndPoint.InvokeAsync[T](<Unknown Parameters>)
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
---> (Remote Exception) {
  "type": "System.InvalidOperationException",
  "message": "Unexpected false",
  "stack": "   at Roslyn.Utilities.Contract.Fail(String message)
   at Roslyn.Utilities.Contract.ThrowIfFalse(Boolean condition)
   at Microsoft.CodeAnalysis.Remote.SolutionCreator.<UpdateProjectInfoAsync>d__10.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 Microsoft.CodeAnalysis.Remote.SolutionCreator.<UpdateProjectAsync>d__9.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 Microsoft.CodeAnalysis.Remote.SolutionCreator.<UpdateProjectsAsync>d__7.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.CodeAnalysis.Remote.SolutionCreator.<UpdateProjectsAsync>d__6.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 Microsoft.CodeAnalysis.Remote.SolutionCreator.<CreateSolutionAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
--- 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.CodeAnalysis.Remote.SolutionService.<CreateSolution_NoLockAsync>d__14.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.CodeAnalysis.Remote.SolutionService.<GetSolutionAsync>d__13.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.CodeAnalysis.Remote.CodeAnalysisService.<>c__DisplayClass31_0.<<RenameSymbolAsync>b__0>d.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.CodeAnalysis.Remote.ServiceBase.<RunServiceAsync>d__14`1.MoveNext()",
  "code": -2146233079,
  "inner": null
}

Similar cases where I couldn't repro the issue:

  • Real VB project in MSBuildWorkspace
  • Programmatically adding a project to a AdhocWorkspace
  • Programmatically adding a project to VisualStudioWorkspace's solution

@GrahamTheCoder
Copy link
Member Author

Issue remains, but this pr was just an example, so closing

@GrahamTheCoder GrahamTheCoder deleted the repro-for-ms branch February 28, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant