Bug 5812 - Copy Local files not consistently copied from dependencies
Summary: Copy Local files not consistently copied from dependencies
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Lluis Sanchez
URL:
Depends on:
Blocks:
 
Reported: 2012-06-22 02:11 UTC by Andrew Rondeau
Modified: 2012-06-26 12:15 UTC (History)
2 users (show)

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 Andrew Rondeau 2012-06-22 02:11:39 UTC
It appears that "Build Action: Content" from dependancies is not being copied to the output folder. The behavior is reproducible; but somewhat non-deterministic. Some "Build Action: Content" files get copied from dependancies; others don't.

This happens on Mac 10.7.4, MonoDevelop 3.0.3.2, Mono 2.10.9

This can be reproduced in a project that I've open-sourced:
 git clone https://github.com/GWBasic/ObjectCloud.git
 cd ObjectCloud
 git checkout 583fa93c1e
 open Server/ObjectCloud.sln

After MonoDevelop opens:
1: Right click on the "ObjectCloud" project and select "Build"
2: Right click on the "ObjectCloud" project and select "Show in Finder", then go to bin/Debug
3: Observe that the ObjectCloud project has ObjectCloud.Disk in its References, and that ObjectCloud.Disk has Factories.xml as "Build Action: Content"
4: Observe that ObjectCloud/bin/Debug does not have Factories.xml
5: Observe that ObjectCloud.Disk/bin/Debug HAS Factories.xml

This bug is inconsistant, but repeatable:
6: Observe that ObjectCloud references ObjectCloud.Disk.Implementation
7: Observe that ObjectCloud.Disk.Implementation has Disk.xml as "Build Action: Content"
8: Observe that ObjectCloud/bin/Debug HAS Disk.xml.

Strange, huh? I've been working with this solution since 2008 using various flavors of Visual Studio and MonoDevelop, and this just showed up!
Comment 1 Martin Potter 2012-06-25 21:18:29 UTC
I just encountered this bug while trying to update from a very old version of MonoDevelop. This bug appears to have been introduced back in April as a result of some performance optimizations. The reason it only occurs for some of your file is due to the order in which the projects are referenced.

For instance:

Project A references Project B and Project C
Project B references Project C

If Project B is referenced before Project C in Project A, Project C's "Build Action: Content" (or None) files would not be copied to Project A's build output folder.

If you modify Project A to reference Project C before Project B, then Project C's "Build Action: Content" (or None) files would be copied to Project A's build output folder.

I have submitted a pull request, https://github.com/mono/monodevelop/pull/205, which fixes the issue, as this breaks most of our projects.
Comment 2 Mikayla Hutchinson [MSFT] 2012-06-25 23:05:23 UTC
Merged, thanks!