Bug 26979 - Build fails as Nib file cannot be found in ibtool folder
Summary: Build fails as Nib file cannot be found in ibtool folder
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.6.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2015-02-11 19:56 UTC by Mauro Horie
Modified: 2015-02-13 06:38 UTC (History)
3 users (show)

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


Attachments
Test project (7.33 MB, application/x-zip-compressed)
2015-02-11 19:56 UTC, Mauro Horie
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:
VERIFIED FIXED

Description Mauro Horie 2015-02-11 19:56:11 UTC
Created attachment 9785 [details]
Test project

The build fails with error message "Cannot copy /Users/...../TestProject/UnifiedTest/UnifiedTest/obj/iPhone/Debug/ibtool/DiscoveryViewControlleriPad.nib" to "Users/...../TestProject/UnifiedTest/UnifiedTest/bin/iPhone/Debug/UnifiedTest.app/DiscoveryViewControlleriPad.nib, as the source file doesn't exist."

If the project initially builds, cleaning and rebuilding the project will trigger the build error. 

The test project has been created as follows (only relevant files and folders shown): 

TestProject
|-NestedFolder
  |-MainController
    |-DiscoveryViewControlleriPad.xib
|-UnifiedTest
  |-UnifiedTest
    |-UnifiedTest.csproj
  |-UnifiedTest.sln

In other words, the NestedFolder is located outside of the UnifiedTest folder where the solution file is located. The xib file is then linked from inside the project. 

If the folder where the xib file is located is moved to inside the project folder, as follows, the error does not occur: 

TestProject
|-UnifiedTest
  |-NestedFolder
    |-MainController
      |-DiscoveryViewControlleriPad.xib
  |-UnifiedTest
    |-UnifiedTest.csproj
  |-UnifiedTest.sln

Another way to bypass the issue under the first structure is to open the xib file with Interface Builder and let XCode index the file. After closing XCode and letting Xamarin synchronize, I am able to successfully build the project. However, cleaning the project will cause the error to occur once again. This process can be repeated indefinitely. The bottom line is that cleaning the project will require you to index and synchronize all xib files in the project in order for the build to succeed. 

Note: the error only started occurring after migrating to the Unified API.
Comment 1 Atin 2015-02-12 13:55:32 UTC
I have checked this issue with the help of given sample and  able to reproduce this  behaviour . When I build the project then following error occurs:

Error: Cannot copy /Users/mac360_xamarin/Desktop/untitled folder/TestProject 2/UnifiedTest/UnifiedTest/obj/iPhoneSimulator/Debug/ibtool/DiscoveryViewControlleriPad.nib to 
/Users/mac360_xamarin/Desktop/untitled folder/TestProject 2/UnifiedTest/UnifiedTest/bin/iPhoneSimulator/Debug/UnifiedTest.app/DiscoveryViewControlleriPad.nib

Build output : https://gist.github.com/Arpit360/c13db2b1b59712032103
Ide logs : https://gist.github.com/Arpit360/566960abc729ab960a99

Hence confirming this issue.

Environment Info:
=== Xamarin Studio ===

Version 5.7.1 (build 17)
Installation UUID: 3d25a767-a003-4a7d-9f5e-e57987cf6cf0
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Xamarin.Android ===

Version: 4.20.0.28 (Trial Edition)
Android SDK: /Users/mac360_xamarin/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.1.20 (Trial Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Starter Edition)

=== Build Information ===

Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.10.0
Darwin mac360-xamarins-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 2 Jeffrey Stedfast 2015-02-12 14:24:15 UTC
Please test this on git master. It should be fixed there.
Comment 3 Atin 2015-02-13 06:38:50 UTC
As per comment 2 I checked this issue with master build. Now, project build successfully without any error.

Screencast:http://www.screencast.com/t/xDj8QbCDO1

Environment Info:

=== Xamarin Studio ===

Version 5.8 (build 949)
Installation UUID: 3d25a767-a003-4a7d-9f5e-e57987cf6cf0
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Xamarin.Android ===

Version: 5.0.99.211 (Business Edition)
Android SDK: /Users/mac360_xamarin/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.1 (6602)
Build 6A1052c

=== Xamarin.iOS ===

Version: 8.9.1.126 (Business Edition)
Hash: d7d470e
Branch: master
Build date: 2015-02-12 00:28:19-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Build Information ===

Release ID: 508000949
Git revision: 8f7efbb873d5c36d001c031d28816bcaa662e4b0
Build date: 2015-02-12 14:46:34-05
Xamarin addins: 0a055f98f95554bec5798266ff821fbc55e20e2f

=== Operating System ===

Mac OS X 10.10.0
Darwin mac360-xamarins-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

Hence, I am closing this issue.