Bug 27223 - VS Extension fails to copy files outside project directory to build host
Summary: VS Extension fails to copy files outside project directory to build host
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.9
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-02-19 12:38 UTC by Adam Kemp
Modified: 2016-12-23 19:25 UTC (History)
5 users (show)

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

Test case (3.38 MB, application/zip)
2015-02-19 12:38 UTC, Adam Kemp

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:

Description Adam Kemp 2015-02-19 12:38:25 UTC
Created attachment 9927 [details]
Test case

This is an extension of bug # 23635, but with a slightly different use case that was alluded to in that bug, but not fixed as far as I can tell. I have a set of projects which all link to a common static library. The static library is in a common directory relative to the solution, which is outside each project's directory. My MtouchExtraArgs looks something like this:

-gcc_flags "-L..\..\Imports -force_load ..\..\Imports\libraryname"

When I try to build this project through Visual Studio that file does not get copied to the host, and so native linking fails.

At first I did not have the library in any of my projects. After looking at bug 23635 I added the library to the project like this:

    <None Include="..\..\Imports\libraryname">

At this point I expected the file to be copied to the build host, but it still is not copied, and the link still fails. At this point I'm not convinced this will work at all, and I think this is a limitation of the tool.

As a test case I have taken the test project from the other bug and modified it to match my use case (i.e., I moved the library it uses outside the project directory and used relative paths to get to it). To reproduce just try building the attached project for iPhone (not the simulator) in Visual Studio.
Comment 3 Jose Gallardo 2016-12-23 19:25:35 UTC

This scenario is currently supported.
Marking the bug as resolved / fixed.

To verify using the provided sample, you'll need to migrate it to Unified API, and also to remove the empty Entitlements.plist