Bug 60276 - Unable to deploy watchOS application to simulator; missing Watch.app/Info.plist using Visual Studio for Mac
Summary: Unable to deploy watchOS application to simulator; missing Watch.app/Info.pli...
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.WatchOS.dll ()
Version: XI 11.2 (d15-4)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-10-19 19:08 UTC by John R
Modified: 2017-10-23 15:02 UTC (History)
2 users (show)

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

Sample Project Showing Issue (542.22 KB, application/zip)
2017-10-19 19:10 UTC, John R

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 John R 2017-10-19 19:08:49 UTC
I'm unable to build my Apple Watch application and run it on the Watch simulator with the latest version of Visual Studio for Mac. It worked with the previous version.


error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.FileNotFoundException: Could not find required file '/Users/u0225413/Source/MyApp/iOS/bin/iPhoneSimulator/Debug/device-builds/iphone10.4-11.0/MyApp.iOS.app/Watch/MyApp.iOS.Watch.app/Info.plist'.
  at Xamarin.Hosting.PList.FromFile (System.String name) [0x0002d] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Hosting/PList.cs:27 
  at Xamarin.Hosting.AppBundle..ctor (System.String path) [0x0000f] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Hosting/AppBundle.cs:59 
  at Xamarin.Launcher.Driver+<LaunchWatchSimulatorAsync>d__65.MoveNext () [0x00040] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/Main.cs:805 
--- End of stack trace from previous location where exception was thrown ---
  at Xamarin.Utils.NSRunLoopExtensions.RunUntilTaskCompletion[T] (Foundation.NSRunLoop this, System.Threading.Tasks.Task`1[TResult] task) [0x00082] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Utils/Extensions.cs:35 
  at Xamarin.Launcher.Driver.Main2 (System.String[] args) [0x00a90] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/Main.cs:432 
  at Xamarin.Launcher.Driver.Main (System.String[] args) [0x0006d] in /Users/builder/data/lanes/5481/2f8bbec0/source/maciostools/Xamarin.Hosting/Xamarin.Launcher/Main.cs:139 

=== Visual Studio Community 2017 for Mac ===

Version 7.2 (build 636)
Installation UUID: deb4c29c-a6bd-41aa-98db-a36303c16de8
	Mono (2017-06/71277e78f6e) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504000201

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: (Visual Studio Community)
Android SDK: /Users/u0225413/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		7.1 (API level 25)
		8.0 (API level 26)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 26.0.1
SDK Build Tools Version: 26.0.1

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: (Visual Studio Community)
Hash: 2f8bbec0
Branch: d15-4-xi
Build date: 2017-10-05 20:56:05-0400

=== Xamarin.Mac ===

Version: (Visual Studio Community)

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 702000636
Git revision: b349c8fc0c2e1aab0179917d56eed75eb3a03337
Build date: 2017-10-06 15:20:04-04
Xamarin addins: a8da992c78f7eb65b3cdb3f951c34a30337cab35
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.13.0
Darwin 17.0.0 Darwin Kernel Version 17.0.0
    Thu Aug 24 22:01:05 PDT 2017
    root:xnu-4570.1.46~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

MFractor 3.02.12
Azure Functions development (Preview) 7.2
NuGet Package Management Extensions 0.12.5
Redth's Addins 1.0.9
Comment 1 John R 2017-10-19 19:10:55 UTC
Created attachment 25374 [details]
Sample Project Showing Issue
Comment 2 Vincent Dondain [MSFT] 2017-10-20 21:24:31 UTC
Hi John,

Thanks for filing a bug about this.

So you project references to the Watch App and Watch Extension appear to be wrong.

2 options to fix your project:

1. You can just remove and re-add the Watch App and Watch Extension references.

2. Right click on the `SnappyCrappy.iOS` project > Tools > Edit File

The project reference should be:

`<ProjectReference Include="..\iOS.Watch\SnappyCrappy.iOS.Watch.csproj">`


`<ProjectReference Include="..\SnappyCrappy.iOS.Watch\SnappyCrappy.iOS.Watch.csproj">`

Do the same thing for the `SnappyCrappy.iOS.Watch` project (edit its csproj for the Watch Extension reference.

Once this is fixed the MSBuild tasks will successfully create the `Watch` folder inside the iOS project and you'll have `../Watch/MyApp.iOS.Watch.app/Info.plist`.

Now I'm not sure why the project reference was not invalidated because the csproj path is clearly wrong (we'll likely mapping with GUID though) so I filed a bug for that: https://bugzilla.xamarin.com/show_bug.cgi?id=60302

Also could you please detail exactly how you renamed the folders? Do you recall? That would help us in case we're not renaming things properly.

Thanks (:
Comment 3 John R 2017-10-23 15:02:19 UTC
Ah, thanks for pointing this out. I should've checked the csproj for references, but the bug you pointed to would definitely be helpful to validate the paths as well.

I don't remember exactly how I did the rename. I believe I did it manually outside of Visual Studio for Mac after I had connected the project references.

Thanks again for the quick response on this!