roslyn: After you dismiss "rename mode" for a symbol that is not a type definition, you never get asked to rename it again

When you change the name of a symbol, Roslyn offers to rename all references to that symbol to another symbol. This only works the very first time however, once you’ve dismissed it - you never get offered again to rename.

  1. Create a new .NET Console Appliction (.NET Framework)
using System.Collections;

public interface IProjectConfigurationsService
{
}

class Program : IProjectConfigurationsService
{

}
  1. Highlight IProjectConfigurationsService in Program : IProjectConfigurationsService
  2. Type ICollection

– Notice the rename frame is around ICollection – image

  1. Press ESC to dimiss completion window and then ESC to get out of rename mode
  2. CTRL+Z twice to undo the name and change it back to ‘IProjectConfigurationsService’
  3. Type ‘ICollection’

Expected: To be back in “rename mode” Actual: Not in rename mode,

NOTE:

  • If you do this to type definition itself interface IProjectConfigurationsService then this works correctly.
  • While above is a good repro, it doesn’t really matter how you rename the symbol in the future - you never get into rename mode again for that symbol unless I close and reopen the file.
  • It doesn’t have to an interface implementations - I could basically repro this whenever you rename a symbol that is not a type definition.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

That is the lowest resolution gif I have ever seen. Is bandwidth down under that bad?