Bug 5605 - Problem when trying to add new file in directory resources/layout-large
Summary: Problem when trying to add new file in directory resources/layout-large
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2012-06-11 04:41 UTC by Lluis Sanchez
Modified: 2012-07-23 06:42 UTC (History)
0 users

Tags:
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:
Status:
RESOLVED FIXED

Description Lluis Sanchez 2012-06-11 04:41:15 UTC
1. I create a new Mono For Android solution in MonoDevelop.
2. In the solution explorer, I expand the 'Resources' folder.
3. I right-click on the 'Resources' folder and select Add -> New Folder and name it 'layout-large'.
4. I right-click on my new 'layout-large' folder and select Add -> New File.
5. I select Android Layout and name it 'mylayout.axml'.

At this point the file gets created in the 'layout' folder instead of the 'layout-large' folder that I selected when adding the new file.

Next:

6. I close the main1.axml file in the designer window.
7. In the solution explorer window I attempt to drag the main1.axml file from 'layout' folder to the 'layout-large' folder.
8. I receive an error message stating: An error has occured. File (full file path) could not be created. The process cannot access the file because it is being used by another process.
9. If I expand the Details tab, the following details are provided:
System.IO.IOException: The process cannot access the file because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.Move(String sourceFileName, String destFileName)
at MonoDevelop.Core.FileSystem.DefaultFileSystemExtension.MoveFile(FilePath source, FilePath dest)
at MonoDevelop.Core.FileService.InternalMoveFile(String srcFile, String dstFile)
at MonoDevelop.Core.FileService.MoveFile(String srcFile, String dstFile)
at MonoDevelop.Ide.ProjectOperations.TransferFiles(IProgressMonitor monitor, Project sourceProject, FilePath sourcePath, Project targetProject, FilePath targetPath, Boolean removeFromSource, Boolean copyOnlyProjectFiles)

10. Once I click OK to close the error dialog, the main1.axml file disappears from view in the solution explorer - it does not appear under any folder in the tree. The file still exists in the 'layout' folder and was not moved (verified by viewing in Windows Explorer).
11. If I close MonoDevelop and start it again, the main1.axml file is once more visible in the Resources\layout folder.
Comment 2 Lluis Sanchez 2012-07-23 06:42:50 UTC
Fixed in master.