Bug 38398 - Linked files not copied to build directory on Mac build host
Summary: Linked files not copied to build directory on Mac build host
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: Normal normal
Target Milestone: 4.1.0 (C7)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-02-03 19:46 UTC by Rich Zwaap
Modified: 2016-05-10 14:43 UTC (History)
7 users (show)

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


Attachments
Visual Studio solution containing repro code (7.03 KB, application/x-zip-compressed)
2016-02-03 19:46 UTC, Rich Zwaap
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 on Developer Community 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:
VERIFIED FIXED

Description Rich Zwaap 2016-02-03 19:46:46 UTC
Created attachment 14871 [details]
Visual Studio solution containing repro code

To repro from attachment:

1.) In Visual Studio, open LinkedFileTestApp solution included in the attached zip
2.) Build the solution
3.) Navigate to the build directory on the Mac build host.  This should be ~/Library/Caches/Xamarin/mtbs/builds/LinkedFileTestApp/<iOS App GUID>.

Result:

The file SomeAddedFile.txt is present in the build directory, while SomeLinkedFile.txt is not.  The only difference between the two files is that SomeAddedFile.txt was added directly to the iOS app project and is thus within the project directory, while SomeLinkedFile.txt was linked into the app project and exists outside it.

---

To repro from scratch:

1.) Create a new Xamarin.iOS app
2.) Link an arbitrary file to the project (e.g. an empty text file):
  a.) Right click project and select Add --> Existing Item
  b.) Browse outside the project directory to the file
  c.) On the Add button, click the drop-down arrow and select Add as Link
3.) Set the file to be copied to the output directory:
  a.) In Solution Explorer, right-click the file and select Properties
  b.) Set "Build Action" to "None"
  c.) Set "Copy to Output Directory" to "Copy if newer"
4.) Build the solution
5.) Navigate to the build directory on the Mac build host.  This should be ~/Library/Caches/Xamarin/mtbs/builds/<iOS App Name>/<iOS App GUID>.

Result:

The file which was added to the app project is not present in the build directory

---

One use-case where this issue is problematic is linking native iOS static libraries.  The current behavior means that the library must be moved or copied into the project directory in order for linking to succeed.  If the library is used in multiple projects,  or for other reasons cannot be moved, this consumes unnecessary disk space.
Comment 2 xamarin-release-manager 2016-02-23 21:41:54 UTC
Fixed in version 99.0.0.1614 (master)

Author: Adrian Alonso
Commit: 17c82d69d9b7253dd4f721a2f58535f7bade9b9e (xamarin/XamarinVS)
Comment 3 xamarin-release-manager 2016-03-03 12:19:26 UTC
Fixed in version 4.1.0.44 (cycle7)

Author: jmt
Commit: 286e6b200b77f6dec0fb8038b737becea4539ae8 (xamarin/XamarinVS)
Comment 4 Rich Zwaap 2016-03-12 01:18:40 UTC
Just updated to 4.1.0.87 via the alpha channel and confirmed this is fixed