An error occurred while executing MTouch (after latest update of Xamarin Visual Studio 4.5.0.443)

CaioshinCaioshin ITMember ✭✭
edited May 2017 in Visual Studio

Hello,
after the last update of previous week, that gives me:
Xamarin Visual Studio 4.5.0.443
Xamarin.iOS (10.10.0.30) on Windows

I wasn't able to correctly run my Xamarin Forms project in iOS simulator.

When I run the app from Visual studio, it starts on my mac emulator, but it immediately crashes showing these errors (debug window from visual studio):

Launching '***' on 'iPhone 7 Plus iOS 10.3'...
The app has been terminated.
Launch failed. The app '***'' could not be launched on 'iPhone 7 Plus iOS 10.3'. Error: An error occurred while executing MTouch. Please check the logs for more details.
The app has been terminated.

Initially, the error was related to an mscorlib dll, like discussed in this thread:
https://bugzilla.xamarin.com/show_bug.cgi?id=56213

Then, I tried a lot of solutions, that was:
1. replace the mscorlib dll on mac
2. installing visual studio for mac to the latest version
3. update mac os on my mac host to the latest version (10.12.5)
4. update xcode to the latest version

and it doesn't be enough to solve my problem.

Then I uninstalled Xamarin Studio and Visual studio but I see that Visual studio under windows still continue to connect to the build host. Is it normal? I would expect to loose this funcionality uninstalling Xamarin studio and Visual studio under Mac.

I already tried to apply the solution suggested in bugzilla thread adding a line in the targets file for ios but it doesn't work.
Now as last temptative I tried to install Monoframework 4.8.1.0 but it doesn't solve.

I tried all these temptative both with Visual studio 2017 and Visual studio 2015.

I would try to clean my Mac installation redoing the environment from scratch, because I have the suspect that there's something in cache that cause the problem.

How can I do a clean install of Xamarin under Mac removing and reinstalling all the tools?

Here above the complete log from visual studio:
Xamarin.VisualStudio.IOS.IdbClient|Error|0|Launch failed. The app '***' could not be launched on 'iPhone 6s iOS 10.3'. Error: An error occurred while executing MTouch. Please check the logs for more details.
Xamarin.Messaging.Exceptions.MonotouchException: An error occurred while executing MTouch
at Xamarin.Messaging.IDB.MTouch+d__8.MoveNext () [0x0023d] in <498da94e23d24b8f9254fbc02791391e>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in /private/tmp/source-mono-2017-02/bockbuild-2017-02/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:535
at Xamarin.Messaging.IDB.MTouch+d__7.MoveNext () [0x00080] in <498da94e23d24b8f9254fbc02791391e>:0
--- End of stack trace from previous location where exception was thrown ---

Posts

  • CaioshinCaioshin ITMember ✭✭
    edited May 2017

    solved completely uninstalling Xamarin and related packages from Mac following the guidelines and manually deleting the folders as explained here, and reinstalling Visual Studio for Mac

  • AshleyGazichAshleyGazich USMember, Xamarin Team Xamurai

    Hi Fabio, sorry to see this was giving you trouble—I’m glad you were able to get back up and running. The logs from Visual Studio are pointing to an error related to launching the app, so we’d need to take a look at that particular diagnostic info to see what went wrong. If you decide to upgrade and run into this again, feel free to update and I’ll be happy to try to help out. Just in case you haven't seen these yet, the Where can I find my version information and logs? and Xamarin.iOS errors are generally helpful for finding a few different log types and errors.

Sign In or Register to comment.