Bug 4810 - M4A fastdev should not require local copy of references
Summary: M4A fastdev should not require local copy of references
Status: RESOLVED DUPLICATE of bug 5151
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 4.1.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-05-01 17:50 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-05-18 15:19 UTC (History)
3 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 Mikayla Hutchinson [MSFT] 2012-05-01 17:50:07 UTC
The MfA apk build doesn't require local copy of references, which is good, because local copy just slows down the build. In fact it would be best if it overrode the PrepareForRunDependsOn property to skip local copy completely, regardless of the flag on the references.

Unfortunately, fastdev does require references to be local copied, since it deploys the dlls from the output directory. This complicates things for users, as it's easy to break by not referencing references-of-references, etc. It also slows the build, as the copies are otherwise superfluous.

Fastdev should directly copy the same assemblies resolved by the msbuild targets and the linker. If they aren't accessible from the deploy code, maybe they could be written as a list into a text file in the obj directory.
Comment 1 Jonathan Pobst 2012-05-01 18:19:16 UTC
I disagree.  The .NET build system is built on requiring Copy Local, and we should not deviate from it.

If you try to run your .NET app, it will only pick up assemblies in the executable's directory or the GAC, it does not go back through the csproj files and try to find assemblies that were available at build time.
Comment 2 Mikayla Hutchinson [MSFT] 2012-05-01 18:40:58 UTC
But M4A does a "copy local" into the apk. An additional copy in the output directory is completely redundant.
Comment 3 Jonathan Pryor 2012-05-02 22:42:16 UTC
When fastdev is enabled, MfA does NOT "copy local" into the .apk. The .apk contains NO assemblies; the assemblies are instead synced to /data/data/App.Package.Name/files/.__override__.

_Release_ builds will "copy local" into the .apk, but Release builds are already so slow I'm not sure that the "copy local" overhead will be noticeable, especially considering that Release does linking...which WILL require copying the assemblies (as part of linking).
Comment 4 Mikayla Hutchinson [MSFT] 2012-05-03 19:31:37 UTC
Firstly, the redundant copies happen for fastdev builds too, so the perf impact might be noticeable for that.

Secondly, it's inconsistent. Non-fastdev builds will work regardless of the local copy settings on the references. Fastdev builds will require local copy on all references, and will require referencing references-of-references simply to local-copy them.
Comment 5 Jonathan Pobst 2012-05-18 15:19:30 UTC

*** This bug has been marked as a duplicate of bug 5151 ***