Bug 2885 - Renaming a project also renames the csproj
Summary: Renaming a project also renames the csproj
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
: 2882 ()
Depends on:
Reported: 2012-01-13 10:42 UTC by Alan McGovern
Modified: 2012-01-16 07:08 UTC (History)
2 users (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 Alan McGovern 2012-01-13 10:42:42 UTC
1) Open a solution with one or more projects
2) Open the project options
3) Change the name in the 'Project Information' section
4) When prompted to save the changes, choose 'cancel'
5) Close the solution
6) Reopen the solution
7) An exception occurs saying that the csproj could not be found.

The csproj file was renamed after choosing 'cancel' which resulted in the sln file not being updated.

Should we even have a way to rename the csproj file from within the project options? It doesn't make sense to me. Would it be better to remove that option and allow the user to rename the csproj only when they right click on it in the solution pane and choose 'Rename'?
Comment 1 Alan McGovern 2012-01-13 10:46:53 UTC
*** Bug 2882 has been marked as a duplicate of this bug. ***
Comment 2 Lluis Sanchez 2012-01-16 02:48:37 UTC
I think it is ok to allow changing the project name in the project options. It makes sense to me.
Comment 3 Alan McGovern 2012-01-16 07:08:47 UTC
My main reason for questioning it is that if the project is referenced by other solutions you may not realise that the csproj file itself has been renamed and thus your other solutions will need to be updated. It's not a big issue. Anyone affected by this should be able to cope with fixing external build issues.

I fixed the main problem anyway so I'll just close this issue.