Bug 29740 - Cannot Build App to Device - Unexpected Error.
Summary: Cannot Build App to Device - Unexpected Error.
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.11 (C5)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-05-05 06:20 UTC by Antony McKane
Modified: 2016-12-22 22:09 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 Antony McKane 2015-05-05 06:20:53 UTC
Hi there,

We're experiencing some extremely odd behaviour when trying to deploy our Xamarin.iOS app to a physical iOS device.  Our code builds and runs on a simulator with no issues, however we cannot get it working on a device.

Last week we couldn't deploy the App as Xamarin was throwing warnings that classes hadn't been denoted with the [Protocol] attribute, however once deployed with that attribute it becomes impossible to instantiate that class and the app crashes. 

I digress however, I'm making this bug report as this week I got another iPad to attempt to deploy to, and I'm now receiving a new and far less helpful error:

1>  Consider app.config remapping of assembly "System.IO, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "2.6.9.0" [] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Facades\System.IO.dll] to solve conflict and get rid of warning.
1>  Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "1.5.0.0" [C:\Dev\minerva\AgilityWorks.Minerva\bin\Debug\System.Net.Http.dll] to Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Xamarin.iOS\v1.0\System.Net.Http.dll] to solve conflict and get rid of warning.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
1>  Minerva.iOS -> C:\Dev\minerva\iOS\bin\iPhone\Debug\MinervaiOS.exe
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(494,3): error : Unexpected error - Please file a bug report at http://bugzilla.xamarin.com 

We've never received this error before and we're currently using the library without the usage of the [Protocol] attribute, so I believe it's an entirely separate error?

Regards,
Antony
Comment 1 Antony McKane 2015-05-15 04:46:22 UTC
I've now gone through the build log and tackled all reference assembly errors that were being raised.  Unfortunately the problem still persists, initially I thought it might of been caused by 'MSB3276' warning mentioned in my earlier report.  However, after removing all Microsoft.Bcl dependent assemblies, this warning is no raised and the error persists.

If there's anything else I can do or supply please let me know.

Regards,
Comment 2 Enzo Heredia 2016-04-11 16:49:57 UTC
are you still seeing this behaviour in latest alpha build?
Comment 3 Jose Gallardo 2016-12-22 22:09:04 UTC
Hi,
As we've introduced several improvements around VS/Mac connectivity and the iOS build system, I'll mark the bug as resolved fixed.
Please feel free to reopen it if you can still reproduce the issue with current bits.
Thanks!