Bug 10444 - Grouped files duplicated when pasting
Summary: Grouped files duplicated when pasting
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: 3.1.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2013-02-19 11:28 UTC by Justin
Modified: 2015-09-08 16:39 UTC (History)
1 user (show)

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

File displaying under another file (32.17 KB, image/png)
2013-02-19 11:28 UTC, Justin
Multiple files displaying under a file (36.37 KB, image/png)
2013-02-19 11:29 UTC, Justin

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 for Bug 10444 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Justin 2013-02-19 11:28:41 UTC
Created attachment 3422 [details]
File displaying under another file

Using keyboard shortcuts I copied and pasted a file (Command-C and Command-V) inside of MD.  Somehow, rather than the new file being placed next to the old file, it was placed under the old file, as if it were a folder... 

I have attached a screenshot showing what happened...

So, here is what I did:
1) Select a file in Solution
2) Command-C to copy the file
3) Using the keyboard, arrow up to the folder (the same folder the original file was in)
4) Command-V to paste the file

I'm not sure what caused it to get into this state, because I have followed these same steps many times and it worked perfectly fine.  However, once in that state for a given file, I can consistently reproduce it for that file. I have attached a screenshot showing multiple copies underneath the original file.

Collapsing/Uncollapsing the folder and manually refreshing the folder did not change anything.  Looking at the file location in Finder the files are added to the file system properly.
Comment 1 Justin 2013-02-19 11:29:26 UTC
Created attachment 3423 [details]
Multiple files displaying under a file
Comment 2 Justin 2013-02-19 11:32:25 UTC
I also just tried closing and re-opening the solution but that didn't clear it up either.

I am able to drag the file up to the folder and then it straightens itself out.
Comment 3 Mikayla Hutchinson [MSFT] 2013-02-19 11:56:07 UTC
This is a feature - file grouping. Commonly used for codebehind/designer files.
Comment 4 Justin 2013-02-20 10:40:08 UTC
Interesting feature, but it might need some improvements. :-)  I found some more precise steps to reproduce the issue I am seeing:

1) Select a file in the Solution
2) Command-C to copy the file
3) Command-V on another file (to do file grouping)
4) Command-C on the parent file of the group
5) Command-V on the directory the parent file is located in
6) Notice, a copy is created of the parent file, but ALSO multiple copies of the child file are created under the original parent file. It looks like it is doubling the number of child files.

It looks like instead of copying all the files in the grouping to the new copied file, it is copying them to the original grouping, thus resulting in double the number of files in the grouping.
Comment 5 Mikayla Hutchinson [MSFT] 2013-02-20 10:49:12 UTC
Okay, that definitely sounds like a bug :)