Bug 26134 - Target _CopyContentToBundle doesn't include storyboard or nibs IF I add reference to PCL
Summary: Target _CopyContentToBundle doesn't include storyboard or nibs IF I add refer...
Status: RESOLVED DUPLICATE of bug 25569
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.6.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2015-01-17 00:43 UTC by Gerry
Modified: 2015-01-22 09:52 UTC (History)
4 users (show)

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


Attachments
Test Project (1.25 MB, application/zip)
2015-01-19 08:36 UTC, Gerry
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 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:
Status:
RESOLVED DUPLICATE of bug 25569

Description Gerry 2015-01-17 00:43:38 UTC
See below 2 different build outputs from a simple test project I created.  The first output my simple test project doesn't include a reference to my PCL project.  Note that the build does include the storyboard and nib files.

Then the second build is when I add a reference (nothing more) to a PCL that I wrote.

========================
FIRST BUILD WITHOUT PCL THAT WORKS
=======================
Building target "_CopyContentToBundle" in project "/Users/ghigh/Projects/MissingResources/MissingResources.csproj" ("/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets"); "_CreateAppBundle" depends on it.
  
  Target _CopyContentToBundle:
  Target _CopyContentToBundle needs to be built as output file 'bin/iPhoneSimulator/Release/MissingResources.app/LaunchScreen.nib' does not exist.
  Task "Copy"
    Using task Copy from Microsoft.Build.Tasks.Copy, Xamarin.iOS.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
    Creating directory '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/ibtool/LaunchScreen.nib' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/LaunchScreen.nib'
    Creating directory '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPhone.storyboardc'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/ibtool/MainStoryboard_iPhone.storyboardc/Info.plist' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPhone.storyboardc/Info.plist'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/ibtool/MainStoryboard_iPhone.storyboardc/UIViewController-vXZ-lx-hvc.nib' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPhone.storyboardc/UIViewController-vXZ-lx-hvc.nib'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/ibtool/MainStoryboard_iPhone.storyboardc/vXZ-lx-hvc-view-kh9-bI-dsS.nib' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPhone.storyboardc/vXZ-lx-hvc-view-kh9-bI-dsS.nib'
    Creating directory '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPad.storyboardc'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/ibtool/MainStoryboard_iPad.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPad.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/ibtool/MainStoryboard_iPad.storyboardc/Info.plist' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPad.storyboardc/Info.plist'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/ibtool/MainStoryboard_iPad.storyboardc/UIViewController-BYZ-38-t0r.nib' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/MainStoryboard_iPad.storyboardc/UIViewController-BYZ-38-t0r.nib'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error_7.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error_7.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error_7@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error_7@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success_7.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success_7.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success_7@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success_7@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/xamarin@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/xamarin@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/xamarin.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/xamarin.png'
  Done executing task "Copy"
  Done building target "_CopyContentToBundle" in project "/Users/ghigh/Projects/MissingResources/MissingResources.csproj".
  

========================
2ND BUILD WITH PCL THAT CRASHES AT RUNTIME DUE TO MISSING STORYBOARD
=======================

Target _CopyContentToBundle:
  Target _CopyContentToBundle needs to be built as output file 'bin/iPhoneSimulator/Release/MissingResources.app/success@2x.png' does not exist.
  Task "Copy"
    Using task Copy from Microsoft.Build.Tasks.Copy, Xamarin.iOS.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
    Creating directory '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error_7.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error_7.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/error_7@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/error_7@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success_7.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success_7.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/success_7@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/success_7@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/xamarin@2x.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/xamarin@2x.png'
    Copying file from '/Users/ghigh/Projects/MissingResources/obj/iPhoneSimulator/Release/xamarin.png' to '/Users/ghigh/Projects/MissingResources/bin/iPhoneSimulator/Release/MissingResources.app/xamarin.png'
  Done executing task "Copy"
  Done building target "_CopyContentToBundle" in project "/Users/ghigh/Projects/MissingResources/MissingResources.csproj".
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-01-19 04:31:13 UTC
Could you attach your test project?
Comment 2 Gerry 2015-01-19 08:36:36 UTC
Created attachment 9398 [details]
Test Project

Unzip and do a build and see if it fails for you (running in simulator).  I tried this ZIP on a new machine and it failed so hopefully you can repro.

You'll just need to get the packages.  If you want my packages directory let me know but was too big to include here.
Comment 3 Gerry 2015-01-19 08:38:12 UTC
Just to clarify my last comment, I was able to take the zip to a new machine (which hadn't run the project before) and run it and duplicate the problem.
Comment 4 Gerry 2015-01-19 16:12:22 UTC
I see this is still marked as "NEEDINFO".  Are you still needing anything from me?
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-01-20 03:31:22 UTC
I can reproduce with the attached project.
Comment 6 Sebastien Pouliot 2015-01-21 11:56:44 UTC
@Jeff that could be related to the other bugs we talked about
Comment 7 Jeffrey Stedfast 2015-01-21 16:09:38 UTC
I can't build this project at all due to there not being a valid ModernHttpClient PCL.
Comment 8 Gerry 2015-01-21 16:27:03 UTC
The packages directory was too big to upload.  I was assuming you guys would be able to get those yourself?  I assume Rolf did since he was able to build.

If you need me to zip then I guess I can but I'll have to share them somewhere.
Comment 9 Jeffrey Stedfast 2015-01-21 16:40:35 UTC
I worked around the ModernHttpClient thing by referencing a dll directly. I also had to comment out the XHUD lines...

Once I did that, this built and afaict, all of the storyboardc and nib files ended up in the app bundle.

*** This bug has been marked as a duplicate of bug 25569 ***
Comment 10 Gerry 2015-01-21 16:58:26 UTC
So, what was Rolf able to reproduce?

Are you saying that I need to add DependsOnTargets to fix this?
Comment 11 Gerry 2015-01-21 17:41:40 UTC
Ok, so adding that setting to Xamarin.iOS.Common.Targets fixed my issue.  Given the number of duplicate bugs I wonder how many are seeing this and not opening bugs and just getting frustrated at Unified API stuff.

Any idea when this will release?

Thanks.
Comment 12 Jeffrey Stedfast 2015-01-22 09:52:48 UTC
I think the plan is to make a hotfix release for this, so hopefully within the next few days (has to go thru QA first)