Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I am developing an app with Xamarin.iOS 6.4 and MvvmCross. I use PCL with async/await.
When I try to launch my app on iPad, the build stop and the debug output disply this :
Failed to load AOT module '<my PCL>' while running in aot-only mode: doesn't match assembly.
And if I click on my app icon on the device,a black screen appear and disappear immediately.
The error message means the assembly in the .app is not the same assembly which was compiled by the AOT compiler, so this is most likely some kind of problem with mtouch.
I also have this and have reported to support.
Do you require any MTBS logs?
If you copy that code over to your Mac and build the project using Xamarin Studio, do you get the same error?
Thought I'd add my two cents as I have had this for a week or so. I have never had the issue in Xamarin Studio just VS.
My workaround is to always delete the contents of the mtbs folder on the Mac every build so it effectively avoids using any cache, its a pain to do but the error never occurs if you do that. However if I leave the folders, make a change, rebuild and deploy the error occurs every time.
OK, thanks for the clarification Michael.
*** Bug 16907 has been marked as a duplicate of this bug. ***
I am not sure if this issue is still present in latest version, but I have it in 188.8.131.52 and here is my workaround.
I have found that cleaning solution before compiling is required in vast majority of cases if you make any modification to the code. Triggering cleaning from inside VS also sends similar command to mac build host. This step appeared to be crucial because removing all files just on Windows machine did not fix the issue. However, it happened that only few files are responsible for this issue. Which files depends on what kind of build you are using:
1) Incremental build (without linking):
/Users/<username>/Library/Caches/Xamarin/mtbs/builds/<project name>/<some hash>/output/temp/mtouch-cache/<project name>.exe.armv7.s
2) Not incremental build (with SDK linking only)
/Users/<username>/Library/Caches/Xamarin/mtbs/builds/<project name>/<some hash>/output/temp/mtouch-cache/Build/monotouch.dll
There are 2 ways to avoid the issue. Either not to forget to clean the project each time or delete those files before each build. Second approach can be made automatic.
1) Enable SSH daemon on Mac. Go to System preferences>Sharing and enable remote login.
2) Download Putty on windows machine. There is several ways how to connect to you Mac, but I can suggest to open putty.exe and create login configuration there and save it under some name (do not forget to provide default username).
3) Enter pre-build event command for your project. It will look something like this
<path to putty directory>\plink.exe -load "<name of your saved configuration from step 2>" -m "$(SolutionDir)build_host_cleanup.txt"
4) build_host_cleanup.txt from previous step contains remote command. We want to delete concrete file, thus the contents of this text file will me something like this
rm -f /Users/<username>/Library/Caches/Xamarin/mtbs/builds/<project name>/<some hash>/output/temp/mtouch-cache/<project name>.exe.armv7.s
5) to make everything working you should also either create private/public keys and save it in the configuration (like I did) or you can add password to the command line (well, this is in case your mac has password). It later case your command line will look like
<path to putty directory>\plink.exe -load "<name of your saved configuration from step 2>" -pw <your password> -m "$(SolutionDir)build_host_cleanup.txt"
Here is quick tutorial on how to create keys https://cs.uwaterloo.ca/cscf/howto/ssh/public_key/#putty
Hello ilya, I am following up on this bug and attempting to reproduce the issue with the latest stable build of our Xamarin Visual Studio product (3.11.666) and so far I have been unable to reproduce the issue.
Please try to upgrade to the latest stable XVS build and if you are still experiencing the same problem please reply and I'd be more than happy to setup a screen sharing session to further debug the issue.
For other folks experiencing this issue please see if in Visual Studio cleaning the solution before compiling resolves the problem.
At this time, I am going to update this bug to be "NeedInfo" as I need additional information on the installed Xamarin version and the Xamarin logs.
Hello ilya, I am following up again on this bug and attempting to reproduce the issue
with the latest stable build of our Xamarin Visual Studio product (3.11.666)
and so far I have been unable to reproduce the issue.
Please try to upgrade to the latest stable XVS build and if you are still
experiencing the same problem please reply and I'd be more than happy to setup
a screen sharing session to further debug the issue.
As we are not getting any response on this bug. So I am closing this issue.
Please feel free to reopen it again, if any one still facing this issue.