Bug 19641 - Content deployment (need better control with MSBuild DependsOn target and Link support)
Summary: Content deployment (need better control with MSBuild DependsOn target and Lin...
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: master
Hardware: PC Windows
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-05-09 05:57 UTC by Virgile Bello
Modified: 2017-01-20 16:49 UTC (History)
7 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 Virgile Bello 2014-05-09 05:57:29 UTC
We have a pipeline where we compile some assets/files that we would like to be part of both Android and iOS package.
For Android we have some (not very nice but working) workarounds. However iOS still have some issues.

1/ We would like to automatically integrate specific files into iOS package (as Content).
However, since _PrepareApplicationBundle and similar targets offer no entry points, we can't add Content programatically.
(we currently rewrite _PrepareApplicationBundle, but it might break very easily).

2/ Another issue is that if we add Content with Link it doesn't seem to work, we have to copy it in the right subfolder relative to .csproj file (i.e. if I want a/b.png, it has to be in Project/a/b.png, symlink doesn't work).
Comment 1 Joaquin Jares 2016-12-22 18:59:26 UTC
I'm moving this to iOS since they control the targets.
Comment 2 Jeffrey Stedfast 2017-01-20 16:49:56 UTC
1. The recommended way for doing this is to override the "BeforeCodesign" target and copy any additional content into the $(AppBundleDir) at that stage of the build.

2. <Link> not working is a known issue (see https://bugzilla.xamarin.com/show_bug.cgi?id=28106). That said, you don't need to copy the file to a/b.png, you could just set the "LogicalName" property to "a\b.png" while copying it anywhere in the project.

For more information, you can check out my StackOverflow answer on this topic at http://stackoverflow.com/questions/16938250/xamarin-studio-folder-structure-issue-in-ios-project/16951545#16951545