dotnet/roslyn

Pressing SHIFT+ENTER in Immediate window crashes editor

Aperta

#25.051 aperta il 26 feb 2018

 (0 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-InteractiveBugTenet-Reliabilityhelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

  1. Start debugging and inside immediate window, put cursor at $$$ and press SHIFT+ENTER:
Services.ContainsKey(typeof(Microsoft.VisualStudio.Shell.Interop.SVsStartupProjectsListService));
error CS0433: The type 'SVsStartupProjectsListService' exists in both 'Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests, Version=42.42.42.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'Microsoft.VisualStudio.ProjectSystem.Managed.VS, Version=42.42.42.42, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Services.ContainsKey(serviceType);
false
Services.ContainsKey(Services.First());
error CS1061: 'Dictionary<Type, object>' does not contain a definition for 'First' and no extension method 'First' accepting a first argument of type 'Dictionary<Type, object>' could be found (are you missing a using directive or an assembly reference?)
$$$Services.ContainsKey(Services.First());
System.NotSupportedException: Changing documents is not supported. at Microsoft.CodeAnalysis.Workspace.CheckAllowedProjectChanges(ProjectChanges projectChanges) 
at Microsoft.CodeAnalysis.Workspace.CheckAllowedSolutionChanges(SolutionChanges solutionChanges) 
at Microsoft.CodeAnalysis.Workspace.TryApplyChanges(Solution newSolution, IProgressTracker progressTracker) 
at Microsoft.CodeAnalysis.Workspace.TryApplyChanges(Solution newSolution) at Microsoft.CodeAnalysis.Editor.Implementation.AutomaticCompletion.Extensions.ApplyTextChanges(Document document, IEnumerable`1 textChanges, CancellationToken cancellationToken) 
at Microsoft.CodeAnalysis.Editor.CSharp.AutomaticCompletion.AutomaticLineEnderCommandHandler.FormatAndApply(Document document, Int32 position, CancellationToken cancellationToken) 
at Microsoft.CodeAnalysis.Editor.Implementation.AutomaticCompletion.AbstractAutomaticLineEnderCommandHandler.ExecuteCommand(AutomaticLineEnderCommandArgs args, Action nextHandler, CommandExecutionContext context) 
at Microsoft.VisualStudio.Commanding.CommandHandlerExtensions.ExecuteCommand[T](ICommandHandler commandHandler, T args, Action nextCommandHandler, CommandExecutionContext executionContext) 
at Microsoft.VisualStudio.UI.Text.Commanding.Implementation.EditorCommandHandlerService.<>c__DisplayClass14_1`1.<Execute>b__1() at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call) 
--- End of stack trace from previous location where exception was thrown --- 
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Guida contributor