Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Buildingproblem after update to IOS 11

swizzyswizzy CHMember ✭✭
edited September 2017 in Xamarin.iOS


I have updated my system to IOS 11. Visualstidio for Windows with all newest xamarin updates, Mac os Sierra is up to date and Xcode is the newest Version.

My Problem:
-Building on Real Device work
-Build on simulator not work:
Error error HE0046: Failed to install the app 'ch.ABC' on the device 'iOS 11.0 (15A372) - iPhone 6 Plus': lstat of /Users/administrator/Library/Caches/Xamarin/mtbs/builds/ABC/a3481f272dab3f68e6e828203695f442/bin/iPhoneSimulator/Debug/ failed: No such file or directory

I even made the whole provisioning completely new. No effect.

Has anyone an idea what could be the problem here?

Edit: breakpoints do not work when debugging on the device...




  • Having the same issue. I'll let you know if I find anything.

  • TylerKostuchTylerKostuch USMember
    edited September 2017

    I'm having the same problem as well. I'll post a solution if I find one.

    Edit: This is only happening to one iOS project. I have three other projects (and I just created a new iOS project for testing things) and they all work.

  • TylerKostuchTylerKostuch USMember
    edited September 2017

    Ok, so I found a solution.

    Go to the iOS Project Options (right click the project, select options), go to Output.

    Change the output path to something else. I changed mine to /Users/tkostuch/test/

    Hopefully that works for you guys too!

  • swizzyswizzy CHMember ✭✭
    edited September 2017

    @ TylerKonstuch I have the path bin\iPhoneSimulator\Debug\ this is only the path on my local windows.. New Projects Work perfect, in the VS for Mac work this project perfect. Wehn i build in VS for windows and debug, terminate after a while with the No such file or directory error.. The file in /Users/administrator/Library/Caches/Xamarin/mtbs/builds/ABC/a3481f272dab3f68e6e828203695f442/bin/iPhoneSimulator/Debug/ on the mac exist. wehn i move the .app file to the simulator (drag and drop) the app is installed normality. So I can try the app but not debug :-(

    It seems like the framework with ios 11 would choose the wrong path..:

    further from the build-log:
    System.IO.FileNotFoundException: The file '/Users/administrator/Library/Caches/Xamarin/mtbs/builds/ABC/a3481f272dab3f68e6e828203695f442/obj/iPhoneSimulator/Debug/build-signature/signature' was not found on the Mac (this file exist on the mac on this path)
    File name: '/Users/administrator/Library/Caches/Xamarin/mtbs/builds/ABC/a3481f272dab3f68e6e828203695f442/obj/iPhoneSimulator/Debug/build-signature/signature'
    at Xamarin.Messaging.Ssh.MessagingFileManager.d__11.MoveNext() in C:\d\lanes\5126\bd7e3753\source\xamarinvs\src\Messaging\Xamarin.Messaging.Ssh\MessagingFileManager.cs:line 171

  • jamoclejamocle USMember ✭✭

    This is the exact same behavior for me. I tried changing the output path to something else in VS (Windows) and to no avail. I am getting the following in my logs...

    Xamarin.Messaging.Exceptions.MonotouchException: error HE0046: Failed to install the app '' on the device 'iOS 11.0 (15A372) - iPhone SE': lstat of /Users//Library/Caches/Xamarin/mtbs/builds/My.Mobile.Apps..iOS/83cad2a171e1fe16878fe0e3efb5ddaa/bin/iPhSim/Debug/ failed: No such file or directory

    Help is much appreciated! I lost 11 hours on this on Friday.

    TylerKostuch, PLease elaborate on how you solved this in your VS (Windows).

    Xamarin Mods...Help Please!!

  • jamoclejamocle USMember ✭✭

    Also in the Xamarin Output I get the following...

    Launching '' on 'iPhone SE iOS 11.0'...
    The app has been terminated.
    Launch failed. The app '' could not be launched on 'iPhone SE iOS 11.0'. Error: error HE0046: Failed to install the app '' on the device 'iOS 11.0 (15A372) - iPhone SE': lstat of /Users//Library/Caches/Xamarin/mtbs/builds//83cad2a171e1fe16878fe0e3efb5ddaa/bin/iPhoneSumulator/Debug/.app failed: No such file or directory
    . Please check the logs for more details.
    The app has been terminated.

  • jamoclejamocle USMember ✭✭

    Please note the path is correct and the files do actually exist in that location. (I removed the appname from the post because my company won't allow me to post it)

  • swizzyswizzy CHMember ✭✭

    @ jamocle
    new Projects work?
    I have now moved to visual studio for mac thats work for me. I hope xamarin fix this error soon as possible..

  • suriyasuriya USMember ✭✭

    me to having the same problem. Old project not able to run in simulator

  • jamoclejamocle USMember ✭✭

    Xamarin, Your silence is deafening.

  • jamoclejamocle USMember ✭✭

    @ swizzy, My timeline is too tight to try to move to a new platform like VS for Mac.

  • swizzyswizzy CHMember ✭✭

    @ jamocle
    Install visual studio for mac, move the complete projectfolder to mac, open the project and run.
    It's very simple. max 1-2h
    Either you change or you make a downgrade. I do not think that a fix of xamarin will come soon...

  • jamoclejamocle USMember ✭✭

    @ swizzy, Why do you feel an update will not come soon from Xamarin? What is your insight here?

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai
    edited September 2017

    Hello All,

    I'm not sure what is going on here when working in Visual Studio on Windows. To help gather more information, please upload and attach your diagnostic build logs. If they contain private information about your project name, please send it to me directly in a message (attach as a file, it's too long to paste). Please also include your version information to this thread so I can verify what is hitting this issue.

    To get full build logs just set the log verbosity to diagnostic at the following locations:
    - On Visual Studio for Mac: Preferences > Projects > Build
    - On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run
    On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
    Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.
    Easiest way to get exact version information:
    - On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
    - On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
    Then copy/paste the version information (you can use the "Copy Information" button).

    Please also make sure you have tried some basic steps like deleting the bin and obj folders. Also, clear the cache on the Mac just to be sure it's not related to that (delete ~/Users/Library/Caches/Xamarin/mtbs/builds). Make sure the Mac and Windows machines are up-to-date with the latest Stable versions of Xamarin.iOS and Xcode 9.

    CC @swizzy @jamocle @suriya @VictorJohnson

  • jamoclejamocle USMember ✭✭

    @JohnMiller Stupid question. How do I message you? Thank you for your help as my productivity has severely plummeted since Friday at 8:00AM when this all started with XCode and Xamarin upgrade

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai


    Click my name above my portrait here to view my profile, then click the "Message" button on the upper right.

  • jamoclejamocle USMember ✭✭

    All, Fixed!!! I did what John suggested above which was to delete both cache's (Win and Mac). I believe deleting my OBJ's was probably what did it since I have cleaned my solution tons of times trying to fix this issue but that does not blitz the obj folder.

  • swizzyswizzy CHMember ✭✭

    @ JohnMiller: I have sent my log via private message.
    obj and bin folder delete has no effect.

    I have started with the project a year ago and always have this and other problems when developing on visual studio (windows):

    once I had to create a new project and copy-paste everything because nothing worked. So it worked again and now at the next update again a problem...

  • swizzyswizzy CHMember ✭✭

    I have visual studio and xamarin completely re-installed on mac and windows. Now everything seems to work...

  • ScottColestock.9633ScottColestock.9633 USUniversity ✭✭

    I've tried a complete uninstall (via the provided shell script) and a reinstall of vstudio mac. However, I'm still getting the "error HE0046: Failed to install the app" failure mode. I'd be very interested if there are other solutions to try...
    (I've already tried renaming output path, etc. as described above without any effect.)

  • ScottColestock.9633ScottColestock.9633 USUniversity ✭✭
    edited October 2017

    My temporary "fix" for this issue (after trying all suggestions above, building clean, manually deleting paths, and even a full uninstall/reinstall of vstudio mac...) was to go to XCode, Preferences, Components, and download the 10.3.1 simulator.

    Launching with that in VStudio Mac allows my app to start/debug fine.

    To be clear, a brand new wizard-generated project launches fine with iOS 11 simulator. I spent a long while comparing what might be different in my "real" project in the csproj and other project-related files. I tried changing several of the differences but couldn't change the broken behavior. I'm going to assume Xamarin will find/fix this issue at some point and stick with the 10.3.1 simulator for now.

  • KevinFordKevinFord USUniversity, Certified XTC Partners ✭✭✭

    After fighting with this for a week I finally resorted to @ScottColestock.9633's answer. As he states it is a workaround but it "fixed it" for me and got me going again.

  • ScottColestock.9633ScottColestock.9633 USUniversity ✭✭

    @JohnMiller are you still looking for additional diagnostic build logs on this issue, or do you have what you need at this point ?

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai


    No, I don't have enough to debug this yet. Feel free to send me your diagnostic logs and I can get an issue filed.

  • _albertoms_albertoms MXUniversity ✭✭

    I solved the problem by fixing some directory names that still had my old app namespace after changing it a few months ago. Before the change, my folders were named something like MyApp.Service/. Then I changed that to App.Service/, but some of them still had the MyApp.*/ style. I updated the name of these folders on Git, also removed the bin/ and obj/ folders, closed and opened Visual Studio and that was it.

    I also tried to run the app using the simulator with iOS 10.3 and it worked, but digging a bit further led me to discover these folder names inconsistencies.

  • AlexAbreuAlexAbreu USMember ✭✭

    I did clean the cache folder on Mac and it works like a charm

  • WestonMartinWestonMartin USUniversity ✭✭

    I'm also having this problem. I'm using Visual Studio for the mac, my OS and VS versions are up to date, the app runs fine on a device but it won't even deploy to a simulator. My Library/Caches/Xamarin folder only contained an "AppInsights" folder which I removed and still nothing. I removed bin and obj folders... nothing.

    I am able to create a new app and run it on the simulators just fine but my existing applications (creating in xamarin studio about 2 years ago) do not run on the simulators. Any solution for this yet?

  • NimralNimral Member ✭✭
    edited February 2018

    @TylerKostuch: AWESOME TIP, thanks mate!

    I don't know why, but setting the output path somewhere else indeed worked. As soon as I restored the setting to the original, the failure was back. Removing the bin folder didn't help, it got successfully recreated by the build, but the failure was back as well.

    I have then played with different paths hoping to get an idea why this happens, and I observed (reproducibly) that the app makes it to the simulator as soon as I move the output folder to somewhere outside the {Application Name}.iOS folder. This is odd, I know, and I hardly could believe it, but the effect was dual-checked and is backed by four-eye principle. As soon as I set the output folder to a subfolder of {Application Name}.iOS, I get this weird error.

    It's also only one Xamarin solution out of approx. 10 which shows this odd failure, all other projects deploy properly with the Visual Studio default path settings.

  • To clarify (some six months later), I was experiencing this issue on Visual Studio for Mac OSX (not Windows).

    Sorry @jamocle if this solution is not applicable to Windows (and for the very, very late reply. Be sure to use the @ sign next time. :smile:)

    @Nimral, glad it fixed your issue.

  • NimralNimral Member ✭✭

    @Tyler: same here. Only the Mac is affected. And as I said, it is only one project (out of approx. 10) which shows the problem. It does so in a steady manner though. Since almost nobody believes me, that such a problem may possibly exist, I do occasionally show it around: set the output path to a subfolder of [projectname].ios --> no simulator, change the path to anywhere else and rebuild --> success.

    If anyone from the development team is interested in looking at the problem live ... drop me a note and we can agree upon a remote session where the problem can be researched by someone more knowledgeable than me.

  • PippaCPippaC Member

    Example Xamarin University code also failing to run in iOS 11 or above simulators.

    I'm new to Xamarin and working through the Xamarin University courses. They're great courses but for a newbie like me I found this problem irritating. It would be good if this problem could be rectified. See details below:

    • New install of Visual Studio for Mac (Community Edition) and Xcode to run the simulator.

    • Two cross-platform courses - "Xamarin University Mobile Training for Microsoft Visual Studio Dev Essentials" and "Introduction to Cross-Platform Mobile Development [XAM110]".

    • Both these courses have completed examples of the first exercise of 'MyTunes':

    • The Dev Essentials code will only run if I select -> MyTunes.IOS -> Debug | iPhoneSimulator -> iOS 10 device.

      • iOS 11 simulators build but fail to load
      • iOS 11 devices both load and run.
    • The XAM110 code examples work correctly.

    As I said they're great courses but I expected the course material to run correctly.

  • OniLeeOniLee Member

    Hi guys
    For me, it worked by removing the xamarin cache on MAC OS.
    How do (MAC OS):
    -> in GO to the top bar, press TAB and select Library.
    -> Select Caches -> Xamarin -> mtbs -> builds
    -> Delete the folder of the your project

  • JohnWilson.4976JohnWilson.4976 AUMember ✭✭

    @OniLee said:
    Hi guys
    For me, it worked by removing the xamarin cache on MAC OS.
    How do (MAC OS):
    -> in GO to the top bar, press TAB and select Library.
    -> Select Caches -> Xamarin -> mtbs -> builds
    -> Delete the folder of the your project

    This worked for me after nothing else did.
    Had this problem myself this morning (after an update to Xcode 10.1 & iOS 12.1) about 3 days ago, suddenly, no matter what I did, it kept telling me it Failed to parse minimum OS version, which is required to launch application on connected device.
    I just clobbered the entire contents of the build folder (but left the build folder alone), rebuilt the project, and everything worked.

  • PhillipSchullerPhillipSchuller USMember ✭✭

    What seemed to fix this for me was that in the project properties, I changed:

    Linker Behavior: Link framework sdks only


    Linker Behavior: Don't Link

    NOTE: my issue was not due to an iOS upgrade. I simply was trying run an existing Xamarin iOS app in VS on my PC. It runs fine not to a simulator on the PC.

  • JohnWilson.4976JohnWilson.4976 AUMember ✭✭

    @PhillipSchuller I just ran into this one this morning (again!), and your solution fixed this for me too, thank you!

    At some point I'd switched to using <MtouchLink>SdkOnly</MtouchLink> one one of my other dev PCs ( probably because it wanted to use the iOS12 SDK and it wasn't installed on that one (it still has Xcode 9 on it with sdk 11.4)

    Then pulling this change onto my original dev macbook (which has latests xcode, ios sdk 12.x) worked, until I deleted the app from the simulator (to try some app changes I'd made from a clean install).

    No matter what I tried (including most of the solutions above), it gave the error about not being able to install it. It did actually push the package over to the simulator, but the icon was grayed out.

    Clearing the obj & bin folders, changing to <MtouchLink>None</MtouchLink> (i.e. Linker Behavior: Don't Link ) and rebuilding the iOS project from scratch then allowed me to deploy to the iOS simulator... AFTER I deleted the grayed-out version of the app again.

  • CompaNovaCompaNova USMember ✭✭

    Not sure exactly, but it feels like it is a problem with the linker.
    We had a similar issue when we added Firebase and MobileAds to a new project. On Windows the project would not compile and on Mac it would not deploy.

    Once we added some code that references both Firebase and MobileAds we were able to compile and deploy. Try to add these two lines to the FinishedLaunching method

    // Initialize Firebase and AdMob
    MobileAds.Configure("your app id");

    CompaNova LLC

  • smoothsmooth Member

    Guys I am still experiencing the same issue I have tried all the above mentioned still no success does anyone have a different solution ?

  • cipo88cipo88 Member

    Just rename folders OBJ and BIN in your NAMEAPP.IOS project and re-run emulator

Sign In or Register to comment.