Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/EditorFeatures/Core/InlineRename/InlineRenameSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,8 @@ private async Task CommitCoreAsync(IUIThreadOperationContext operationContext, b
{
var previewService = _workspace.Services.GetService<IPreviewDialogService>();

// The preview service needs to be called from the UI thread, since it's doing COM calls underneath.
await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
newSolution = previewService.PreviewChanges(
string.Format(EditorFeaturesResources.Preview_Changes_0, EditorFeaturesResources.Rename),
"vs.csharp.refactoring.rename",
Expand Down