Bug 23953 - "Could not find required file ... Info.plist" if project built once locally before connecting to build host
Summary: "Could not find required file ... Info.plist" if project built once locally b...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.7
Hardware: PC Windows
: High normal
Target Milestone: 3.10
Assignee: Bugzilla
URL:
: 23106 ()
Depends on:
Blocks:
 
Reported: 2014-10-20 21:16 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-02-09 14:31 UTC (History)
9 users (show)

Tags:
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 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 FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2014-10-20 21:16:08 UTC
"Could not find required file ... Info.plist" if project built once locally before connecting to build host


## Steps to reproduce

1. Start with the Xamarin.iOS Build Host app *not* running on the Mac. If you like, you can delete the `~/Library/Caches/Xamarin/mtbs/builds` folder too, just to make sure there aren't any lingering files from previous builds interfering with the results.

2. Create a new "Visual C# -> iOS -> Classic API -> iPhone -> Single View App (iPhone | Classic API)".

4. Build the project.

5. Start the Xamarin.iOS Build Host app on the Mac, and connect to it from VS.

6. Click the green arrow "Start" button in Visual Studio to attempt to debug the app again.


## Result

VS does not perform any build step (presumably because the local build files are still present on Windows). Instead, VS attempts to launch the "existing" build of the app on the build host and fails with the following error because that build doesn't exist:

> Failed to start application on the target simulator
> OK
> Build server returned an Error.
> error MT0024: Could not find required file
> '/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPhoneApp1/95d720a42fb
> ba833d6d1e88642cdd9ca/bin/iPhoneSimulator/Debug/iPhoneApp1.app/Info.plist'.


The corresponding error in `mtbserver.log` looks like this:
> [20-Oct-2014 20:14:39] Starting /Developer/MonoTouch/usr/bin/mtouch 
>   -sdkroot "/Applications/Xcode.app/Contents/Developer"
>   --launchsim "/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPhoneApp1/95d720a42fbba833d6d1e88642cdd9ca/bin/iPhoneSimulator/Debug/iPhoneApp1.app" 
>   -stdout "/Users/macuser/Library/Logs/Xamarin/MonoTouchVS/Simulator/iPhoneApp1/95d720a42fbba833d6d1e88642cdd9ca/out.log"
>   -stderr "/Users/macuser/Library/Logs/Xamarin/MonoTouchVS/Simulator/iPhoneApp1/95d720a42fbba833d6d1e88642cdd9ca/err.log"
>   --device=:v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-8-0,devicetype=com.apple.CoreSimulator.SimDeviceType.iPhone-5s
>   -argument=-monodevelop-port -argument=58468 -sdk 8.0
> [20-Oct-2014 20:14:40] Request handled in 2.759ms
> [20-Oct-2014 20:14:41] stderr: error MT0024: Could not find required file
>   '/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPhoneApp1/95d720a42
>   fbba833d6d1e88642cdd9ca/bin/iPhoneSimulator/Debug/iPhoneApp1.app/Info.plist'.


After these steps, the build cache for the app contains just one empty sub-folder:

> $ find ~/Library/Caches/Xamarin/mtbs/builds/iPhoneApp1
> /Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPhoneApp1
> /Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPhoneApp1/95d720a42fbba833d6d1e88642cdd9ca


If you close and reopen the solution and repeat step 5, the Build output remains empty and the Debug output shows:
> Getting device...
> Starting debug on:iPhone 5s iOS 8.0
> Launching Application for debugging...
> Starting debug session...
> Debugging session ended.


## Expected result

Perhaps the error message can be changed to indicate that the remote build folder is missing entirely, so the local build should be cleaned?

A more complicated option might be to rebuild the project automatically if the remote build folder is missing, but that could introduce various undesirable side effects.


## Version information
Xamarin   3.7.230.0 (e78d10d6993f95fc3ebe791aeb4aacff165bf8bb)
Xamarin.Android   4.18.0.39 (0ef616ae42005ece52f6df7aa1e093ceb11998f8)
Xamarin.iOS   8.4.0.0 (209abebbd8f1a292d042420edb45fa5fbd3f017b)

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

### Mac build host
Xamarin.iOS 8.4.0.14 (Business Edition)
Hash: 1d464a1
Build date: 2014-10-17 21:50:07-0400

Mono 3.10.0 ((detached/e204655)

Xcode 6.0.1 (6528), Build 6A317
Mac OS X 10.9.5
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2014-10-20 21:40:09 UTC
Suspected duplicate:
https://bugzilla.xamarin.com/show_bug.cgi?id=23106
Comment 2 Parmendra Kumar 2014-10-21 09:36:46 UTC
I have checked this issue and I am able to reproduce this issue,To reproduce this issue I have followed steps defined in the bug description.

Screencast:http://www.screencast.com/t/HTrJottiJ
Error:https://gist.github.com/Parmendrak/9b9eccc6ea0cb8612462
MtbLogs: https://gist.github.com/Parmendrak/eecbce1bd4d86f9bba7c

Environment Info:
Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

Xamarin   3.7.226.0 (bde1ced5c221b04ff6c6c147e50fd5ca0000cbd1)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.18.0.38 (c0168255507205e3f50aba560ccf971c41a682ff)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.2.0.0 (06812e63c56a62c5ed6298167da3c71c6baf8852)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 6 Jose Gallardo 2015-02-05 11:13:52 UTC
*** Bug 23106 has been marked as a duplicate of this bug. ***
Comment 7 Emanuel 2015-02-09 14:31:44 UTC
Added message in the error list if the build folder does not exist or is empty:
error: The folder "/MyApp/" is empty or does not exist on the Mac Build Host. Please try to rebuild the project.

Wrench: 67de2ef1828e7ddfb93f5f849103413c49e370fa
Commit: 8d67d09e85a76dc9bdc2819c218bf628aee84c50