Bug 12093 - "An error has occurred" dialog comes up renaming into collision
Summary: "An error has occurred" dialog comes up renaming into collision
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 4.0.3
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Bugzilla
Depends on:
Reported: 2013-05-03 12:43 UTC by Chris Hamons
Modified: 2015-08-25 07:19 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 Chris Hamons 2013-05-03 12:43:50 UTC
If you rename a file into an existing file not in the project you get this.

Steps to reproduce.
New Project.
In text editor create foo.cs next to created main cs file.
In project tree, rename file to foo.cs

System.IO.IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path: 
  at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00141] in /private/tmp/source/bockbuild/profiles/mono-2-10/build-root/mono-2.10.12/_build/mono-2.10.12.git/mcs/class/corlib/System.IO/File.cs:317 
  at MonoDevelop.Core.FileSystem.DefaultFileSystemExtension.RenameFile (FilePath file, System.String newName) [0x00000] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/DefaultFileSystemExtension.cs:50 
  at MonoDevelop.Core.FileService.InternalRenameFile (System.String srcFile, System.String newName) [0x00008] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs:196 
  at MonoDevelop.Core.FileService.RenameFile (System.String oldName, System.String newName) [0x00032] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs:136 
  at MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectFileNodeCommandHandler.RenameItem (System.String newName) [0x0015e] in /Users/builder/data/lanes/monodevelop-lion-bs1/fae7c2bd/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs:181
Comment 1 Lluis Sanchez 2015-08-25 07:19:07 UTC
Current stable shows an "File name already in use" error message.