Bug 32983 - Build targets should ignore local-copy flag on references
Summary: Build targets should ignore local-copy flag on references
Status: ASSIGNED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.10
Hardware: PC Mac OS
: Normal enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2015-08-11 18:36 UTC by Mikayla Hutchinson [MSFT]
Modified: 2017-01-23 16:41 UTC (History)
4 users (show)

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


Attachments
patch for xamarin-macios (1.12 KB, patch)
2016-06-13 16:30 UTC, Jeffrey Stedfast
Details


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 32983 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:
Status:
ASSIGNED

Description Mikayla Hutchinson [MSFT] 2015-08-11 18:36:39 UTC
Right now if a reference (project or dll) is marked local copy, MSBuild copies it to the output directory. For iOS this is completely pointless. The build targets should suppress this.
Comment 1 Danish Akhtar 2015-08-25 06:29:40 UTC
Hi mhutch,

Today, I have tried to reproduce this issue and observed the following behaviour.

>>Case 1: On Mac with iOS application(enable Local copy option)
1. Create a iOS application.
2. Add .dll reference 
3. Build the application.

Observed that we are getting .dll file in bin folder of application but not in obj folder of application.

>>Case 2: On Mac with iOS application(disable Local copy option)
1. Create a iOS application.
2. Add .dll reference 
3. Build the application.

Observed that we are not getting .dll file in bin and obj folder of application.


Please let me know I am in right direction OR is there anything else I can check here to reproduce this?

Thanks
Comment 2 Mikayla Hutchinson [MSFT] 2015-08-25 12:44:56 UTC
Yes. The "local copy" option should be ignored for iOS, i.e. when local copy is enabled, the dll should not be copied.

This is an enhancement. The copied dlls are not a problem for iOS, they're just unnecessary and possible slow down the build and confuse users.
Comment 3 Jeffrey Stedfast 2015-08-31 15:55:23 UTC
Any hints on how to do this?
Comment 4 Mikayla Hutchinson [MSFT] 2015-09-03 14:51:00 UTC
Dunno, ask Ankit?

Maybe you could have a target run before assembly resolution that duplicated the reference items but override Private=false, remove the original items from the list, add the modified ones back in.
Comment 5 Sebastien Pouliot 2016-06-09 01:10:16 UTC
c.c. Ankit
Comment 6 Jeffrey Stedfast 2016-06-13 16:30:53 UTC
Created attachment 16301 [details]
patch for xamarin-macios

Unfortunately this patch breaks the RebuildExecutable_TouchLibraryDll unit test (and maybe others).

It seems that it causes the Csc task to fail to resolve some Foundation/etc namespaces.