dotnet/roslyn
GitHub で見るAttempt to drop light-bulb on a renamed generated symbol that no longer exists results in code fix crash
Open
#27,203 opened on 2018年5月28日
Area-IDEBugFeature - Renamehelp wanted
説明
Version Used:
Steps to Reproduce:
If you rename a symbol outside of the editor, the rename tracking code fix doesn't like it:
private async Task<Guid> GetSingleFileGeneratorsGuid()
{
var generalProperties = await this.ProjectNode.ActiveProjectConfig.GetConfigurationGeneralPropertiesAsync(preferSnapshot: true);
string guid = await generalProperties.SingleFileGeneratorsTypeGuid.GetEvaluatedValueAtEndAsync(); <!-- SingleFileGeneratorsTypeGuid comes from generated code from XAML that I renamed in the XAML
return Guid.TryParse(guid, out Guid result) ? result : this.ProjectNode.ProjectTypeGuid;
}
System.AggregateException : One or more errors occurred. ---> Invoked rename tracking smart tag but cannot find the symbol.
at async Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking.RenameTrackingTaggerProvider.RenameTrackingCommitter.RenameSymbolAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking.RenameTrackingTaggerProvider.RenameTrackingCodeAction.ComputePreviewOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeActions.CodeAction.GetPreviewOperationsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.GetPreviewResultAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedActionWithNestedFlavors.<>c__DisplayClass11_0.<GetPreviewAsync>b__0(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
---> (Inner Exception #0) System.InvalidOperationException : Invoked rename tracking smart tag but cannot find the symbol.
at async Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking.RenameTrackingTaggerProvider.RenameTrackingCommitter.RenameSymbolWorkerAsync(<Unknown Parameters>)
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---