Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Description of Problem:
Steps to reproduce the problem:
1. Rename a file.
Class contained in the class.cs file should also be refactored.
Only the filename is changed.
How often does this happen?
All the time.
Or at least have a checkbox (like in the rename class function) to suggest renaming the class as well.
I have checked this issue and I am able to reproduce this issues.
Steps I followed:
1. Create a console project in XS.
2. Add a new empty class to the project.
3. In solution view right click on file name and select "Rename" option
4. Enter the name to the class
I observed that when I rename the .cs file from the solution view the class is not changed.
Note: When I click on any class name in editor and choose the "Refactor => Rename" option and enter the new class name in "New Name" text box with "rename file that contains public class" check box is checked and press ok button it rename the class name and also rename the file name.
Mac OS X 10.9.5
Xamarin Studio 5.5 (build 221)
Mono 3.10.0 ((detached/ac51002)
GTK+ 2.24.23 (Raleigh theme)
Package version: 310000016
=== Build Information ===
Release ID: 505000221
Git revision: 5593ae2759cc72daba96ad1a7bcf2b584a26e1cc
Build date: 2014-09-25 17:56:39-04
Xamarin addins: 9c609d1ca384863aafef4336d94b4b55d059d4ff
Hi Leslie, I'm not sure the expected behavior in the description would be the expected behavior for all users.
When a user is renaming a class and the name of the file is the class name, it makes sense to me that the file should be renamed. Most people who have single-class files will want the name of the file to be the class name.
When a user explicitly renames a file without refactoring the class, there are any number of reasons why they might want to just rename the file and not the class.
I'm going to resolve this as a FEATURE, but I'm open to other arguments for why this should be the universal expected behavior, I may be missing something. If so please REOPEN.