Bug 23425 - When attempting to deploy an iPad app to an iPhone, the error in the "Error List" is a little misleading
Summary: When attempting to deploy an iPad app to an iPhone, the error in the "Error L...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.7
Hardware: PC Windows
: --- minor
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-09-26 17:03 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2015-02-11 03:27 UTC (History)
6 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-09-26 17:03:34 UTC
XamarinVS.iOS allows the user to attempt to deploy iPad-only iOS apps to physical iPhone devices. The deploy fails in this case, and the "Error List" shows a message that suggests "Please try to rebuild the solution and try again." Rebuilding won't help, but if you double-click the error message, you get a more informative error message.

Request: change the error in the "Error List" so that it suggests double-clicking the error for more details.

Thanks!


## Steps to reproduce

1. Create a new iPad project: "Visual C# -> iOS -> Classic API -> iPad -> Single View App (iPad | Classic API)".

2. Connect a physical iPhone to the Mac build host.

3. Click the start debugging "play" button to attempt to build and deploy the iPad app to device.


## Result on Visual Studio

### Error in "View -> Error List"
> Failed to deploy application on the target device. Please try to rebuild the solution and try again.	Xamarin.iOS Extension

The problem is that this error message doesn't suggest that the user should try double-clicking the error message for more details. It just says "rebuild the solution and try again." Rebuilding will _not_ fix this problem. The user should double-click the error to find this more detailed explanation:

> OK
> Build server returned an Error.
> error MT1006: Could not install the application
> '/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPadApp/f4b69fd767909dd0d864af082752728c/bin/iPhone/Debug/iPadApp.app'
> on the device Apple Developer’s iPhone: The code was compiled for a
> different kind of device that the one connected (iPad vs iPhone for
> example, error: 0xe8000080).
> writeDictToFile:1249 open failed for
> /Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPadApp/f4b69fd767909dd0d864af082752728c/obj/iPhone/Debug/mtouch-cache/install-shadow-directory/25d29c67fad3de137138de174af34702/22370b3744bb0ac7defe0a4b8e617daebadaa1ee/ManifestCache.plist
> : No such file or directory
> MDMCacheDirectoryManifest:1323 writeDictToFile failed to write to
> /Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPadApp/f4b69fd767909dd0d864af082752728c/obj/iPhone/Debug/mtouch-cache/install-shadow-directory/25d29c67fad3de137138de174af34702/22370b3744bb0ac7defe0a4b8e617daebadaa1ee/ManifestCache.plist
> : No such file or directory
> error MT1006: Could not install the application
> '/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPadApp/f4b69fd767909dd0d864af082752728c/bin/iPhone/Debug/iPadApp.app'
> on the device Apple Developer’s iPhone: The code was compiled for a
> different kind of device that the one connected (iPad vs iPhone for
> example, error: 0xe8000080).
> 
> Please ensure your device is connected...
> Connected to: Apple Developer’s iPhone
> Installing application bundle


### "Output -> Debug"
> Getting device...
> Starting debug on:Apple Developer's iPhone
> Launching Application for debugging...
> Starting debug session...


### "Output -> Mac Server Log"

The "Mac Server Log" almost shows the full message, but it's cut off due to bug 22080.

> [26-Sep-2014 16:31:40] Handling with command: [DeployApplication: CommmandUrl=DeployApplication] (22)
> [26-Sep-2014 16:31:40] Attempting to acquire command execution lock, timeout set to 00:10:00
> [26-Sep-2014 16:31:40] Starting /Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --devname "Apple Developer’s iPhone" --installdev "/Users/macuser/Library/Caches/Xamarin/mtbs/builds/iPadApp/f4b69fd767909dd0d864af082752728c/bin/iPhone/Debug/iPadApp.app"
> Deploy failed
> iPhone for example, error: 0xe8000080).
> [26-Sep-2014 16:31:43] stdout: Please ensure your device is connected...
> Connected to: Apple Developer’s iPhone
> Installing application bundle
> [26-Sep-2014 16:31:43] Command [DeployApplication: CommmandUrl=DeployApplication] finished (22)



## Result on Xamarin Studio

### "View -> Pads -> Deploy to Device"

> error MT1006: Could not install the application
> '/Users/macuser/Projects/iPadApp/iPadApp/bin/iPhone/Debug/iPadApp.app'
> on the device : The code was compiled for a different kind of device
> that the one connected (iPad vs iPhone for example, error:
> 0xe8000080).



## Version information

Xamarin   3.7.126.0 (d5382b8b3a2baf01a2413b145b96b5563d75d4c8)
Xamarin.Android   4.18.0.24 (3ebb5e477e2d3a62f6ba7a0dbc774bdfba2da1c9)
Xamarin.iOS   8.2.57.0 (06491f39c4d42b5fe5b685ef91a843177f5e7247)

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.2.0.176 (Business Edition), Hash: 973f8d4

Mono 3.10.0 ((detached/ac51002)
Xcode 6.0.1 (6528), Build 6A317
Mac OS X 10.9.4
Comment 1 Saurabh 2015-02-06 05:31:27 UTC
I have checked this Issue with latest build and observed that when application is iPad only and iPhone is connected to mac build host, I am not seeing connected iPhone in device dropdown on VS. This is the screencast for the same: http://www.screencast.com/t/eAWszLVO

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Installed Version: Professional

LightSwitch for Visual Studio 2013   06177-004-0446016-02238
Microsoft LightSwitch for Visual Studio 2013

Team Explorer for Visual Studio 2013   06177-004-0446016-02238
Microsoft Team Explorer for Visual Studio 2013

Visual Basic 2013   06177-004-0446016-02238
Microsoft Visual Basic 2013

Visual C# 2013   06177-004-0446016-02238
Microsoft Visual C# 2013

Visual C++ 2013   06177-004-0446016-02238
Microsoft Visual C++ 2013

Visual F# 2013   06177-004-0446016-02238
Microsoft Visual F# 2013

Visual Studio 2013 Code Analysis Spell Checker   06177-004-0446016-02238
Microsoft® Visual Studio® 2013 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Windows Phone SDK 8.0 - ENU   06177-004-0446016-02238
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   1.0
Application Insights Tools for Visual Studio

ASP.NET and Web Tools   12.4.51016.0
Microsoft Web Developer Tools contains the following components:
Support for creating and opening ASP.NET web projects
Browser Link: A communication channel between Visual Studio and browsers
Editor extensions for HTML, CSS, and JavaScript
Page Inspector: Inspection tool for ASP.NET web projects
Scaffolding: A framework for building and running code generators
Server Explorer extensions for Microsoft Azure Websites
Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Microsoft Azure

ASP.NET Web Frameworks and Tools 2012.2   4.1.21001.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.21010.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.3
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Microsoft Azure Mobile Services Tools   1.3
Microsoft Azure Mobile Services Tools

NuGet Package Manager   2.8.50926.663
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2013 ENU   12.0.30626
Microsoft Office Developer Tools for Visual Studio 2013 ENU

PowerShell Tools   1.3
Provides file classification services using PowerShell

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   12.0.41012.0
Microsoft SQL Server Data Tools

Windows Phone 8.1 SDK Integration   1.0
This package integrates the tools for the Windows Phone 8.1 SDK into the menus and controls of Visual Studio.

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin   3.9.293.0 (080a254)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.20.0.34 (49a04b966feb40dfdba49d57ba16249b66d606a6)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.6.1.0 (3b3ef438017c7ecf486defa9e01567a5f2b3cb2a)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

@Brendan, Are you still getting same Issue with latest builds?
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2015-02-11 03:27:45 UTC
We can tentatively close this issue pending the resolution of bug 26545. Part of the new Unified Devices feature in XVS 3.9 apparently changed the way that the device list is filtered. That change stops this bug because it prevents users from deploying iPad apps to iPhone. As long as the fix for 26545 doesn't revert that new behavior, this bug is all set.