Bug 36212 - [Roslyn] Renaming class renames other classes with the same name
Summary: [Roslyn] Renaming class renames other classes with the same name
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Roslyn
Assignee: Mike Krüger
Depends on:
Reported: 2015-11-24 12:16 UTC by Stephen Shaw
Modified: 2015-11-25 02:33 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Stephen Shaw 2015-11-24 12:16:22 UTC
If you copy and paste a file that contains a single class and then try to rename the copied version it also renames the original file.

1. Copy/paste a file in your project
2. Rename the class in the pasted class with refactoring tools (cmd-R)
3. Notice that the original file is also renamed and the class in the file.
Comment 1 Mike Krüger 2015-11-25 02:33:04 UTC
It's a feature - you're creating partial classes with missing partial modifier.

But roslyn is treating it like that (read: we share this behavior with vs.net). It makes sense doing this because the class has the same name & namespace therefore it's part of a 'family' and a library like roslyn would have a hard time to differentiate these classes.