The root assembly conflicts with another assembly

Ashok.VeldiAshok.Veldi AshokUS ✭✭
edited April 10 in Xamarin.Forms

Hi, after updating my Xamarin for Visual Studio it shows

Severity Code Description Project File Line Suppression State
Error The root assembly /Users/focus/Library/Caches/Xamarin/mtbs/builds/Sample.iOS/f4117d8ec82f837c5c099ce86166d4d3/bin/iPhoneSimulator/Debug/Sample.iOS.exe conflicts with another assembly (/Users/focus/Library/Caches/Xamarin/mtbs/builds/Sample.iOS/f4117d8ec82f837c5c099ce86166d4d3/bin/iPhoneSimulator/Debug/Sample.iOS.exe).

while building the ios project help me for solving this.
Thank you.

Best Answer


  • GotchaBroGotchaBro postiga US

    same here +1

  • Mike.4896Mike.4896 Michael Courtemanche US

    I'm having the same issue. I upgraded XCode to 8.3.1, and also applied all Xamarin update via Xamarian Studio; now can not build. Please advise ASAP :)

  • JoeHealyJoeHealy Joe Healy US ✭✭

    same here

  • HomeroLaraHomeroLara Homero Lara US ✭✭

    I believe there is a work around for this here:

  • EEWEEW Ernest Wiggins US

    Did I do this right? Line 85

     <MTouchReferencePath Include="@(_Assemblies)" Condition="'%(_Assemblies.IsKeyOutput)' != 'true'" />

    Getting new error I can build, deploy and start the app then it crashes.

    Launching 'MFA.DynamicForms.Mobile.iOS' on 'MFA's iPhone'...
    Loaded assembly: /private/var/containers/Bundle/Application/D1CE63BD-905B-421C-B506-E30EC9E2A96D/ [External]
    Loaded assembly: /private/var/containers/Bundle/Application/D1CE63BD-905B-421C-B506-E30EC9E2A96D/ [External]
    Loaded assembly: /private/var/containers/Bundle/Application/D1CE63BD-905B-421C-B506-E30EC9E2A96D/ [External]
    2017-04-10 15:28:05.774 MFADynamicFormsMobileiOS[302:49109] error: * Assertion at /Users/builder/data/lanes/4691/fe490c24/source/xamarin-macios/external/mono/mono/mini/aot-runtime.c:1731, condition `data' not met
    2017-04-10 15:28:05.775 MFADynamicFormsMobileiOS[302:49109] critical: Stacktrace:

    2017-04-10 15:28:05.775 MFADynamicFormsMobileiOS[302:49109] critical:
    Native stacktrace:
    2017-04-10 15:28:06.276 MFADynamicFormsMobileiOS[302:49109] critical: 0 MFADynamicFormsMobileiOS 0x0279c2f1 mono_handle_native_crash + 222
    2017-04-10 15:28:06.277 MFADynamicFormsMobileiOS[302:49109] critical: 1 libsystem_platform.dylib 0x1d3f0259 _sigtramp + 24
    2017-04-10 15:28:06.277 MFADynamicFormsMobileiOS[302:49109] critical: 2 libsystem_pthread.dylib 0x1d3f60f7 pthread_kill + 62
    2017-04-10 15:28:06.277 MFADynamicFormsMobileiOS[302:49109] critical: 3 libsystem_c.dylib 0x1d2d295b abort + 108
    2017-04-10 15:28:06.277 MFADynamicFormsMobileiOS[302:49109] critical: 4 MFADynamicFormsMobileiOS 0x028695b0 _ZL12log_callbackPKcS0_S0_iPv + 76
    2017-04-10 15:28:06.278 MFADynamicFormsMobileiOS[302:49109] critical: 5 MFADynamicFormsMobileiOS 0x02858511 eglib_log_adapter + 176
    2017-04-10 15:28:06.278 MFADynamicFormsMobileiOS[302:49109] critical: 6 MFADynamicFormsMobileiOS 0x028636a1 monoeg_g_logv + 72
    2017-04-10 15:28:06.278 MFADynamicFormsMobileiOS[302:49109] critical: 7 MFADynamicFormsMobileiOS 0x028637ad monoeg_assertion_message + 32
    2017-04-10 15:28:06.278 MFADynamicFormsMobileiOS[302:49109] critical: 8 MFADynamicFormsMobileiOS 0x02774929 load_aot_module + 618
    2017-04-10 15:28:06.279 MFADynamicFormsMobileiOS[302:49109] critical: 9 MFADynamicFormsMobileiOS 0x027b1c4d mono_assembly_load_from_full + 878
    2017-04-10 15:28:06.279 MFADynamicFormsMobileiOS[302:49109] critical: 10 MFADynamicFormsMobileiOS 0x027b1893 mono_assembly_open_a_lot + 770
    2017-04-10 15:28:06.279 MFADynamicFormsMobileiOS[302:49109] critical: 11 MFADynamicFormsMobileiOS 0x0286869c _Z21xamarin_open_assemblyPKc + 156
    2017-04-10 15:28:06.279 MFADynamicFormsMobileiOS[302:49109] critical: 12 MFADynamicFormsMobileiOS 0x02868984 xamarin_open_and_register + 28
    2017-04-10 15:28:06.279 MFADynamicFormsMobileiOS[302:49109] critical: 13 MFADynamicFormsMobileiOS 0x02773b5d _Z32xamarin_register_assemblies_implv + 26
    2017-04-10 15:28:06.280 MFADynamicFormsMobileiOS[302:49109] critical: 14 MFADynamicFormsMobileiOS 0x028761d4 xamarin_main + 2000
    2017-04-10 15:28:06.280 MFADynamicFormsMobileiOS[302:49109] critical: 15 MFADynamicFormsMobileiOS 0x02773d49 main + 112
    2017-04-10 15:28:06.280 MFADynamicFormsMobileiOS[302:49109] critical: 16 libdyld.dylib 0x1d26a4eb + 2

    2017-04-10 15:28:06.280 MFADynamicFormsMobileiOS[302:49109] critical:

    Got a SIGABRT while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.

  • rajveerrajveer raj veer US ✭✭
    edited April 11

    I'm having the same issue. @Thomas.Bienkowski could you please explain about the Workaround.

  • jebkisjebkis jens burgstaller DE

    I had the same issue and manged to use the workaround.
    the file Xamarin.iOS.Common.After.targets can be opened with VS.
    For me the path was C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS

    Then remove the lines with '-' and add the lines with '+' from @Thomas.Bienkowski workaround.

    If you cant find the file search for Common.After.targets in your Explorer with startfolder "c:\Program Files (x86)"
    or "c:\Programs" depending on 32- or 64 bit.

    Hope this explaination helps.

  • Thomas.BienkowskiThomas.Bienkowski Thomas Bienkowski GB ✭✭

    Actually, here's an explanation and a proper fix for this from Brendan Zagaeski

    Xamarin versions installed by latest Visual Studio for Mac Preview are incompatible with the default Stable Xamarin version installed by Visual Studio on Windows
    The most visible current symptom of this problem is the error "The root assembly ... conflicts with another assembly" when building Xamarin.iOS projects.
    ## Recommended resolution in production environments: downgrade to the Xamarin Stable channel on the Mac using Xamarin Studio
    1. Open "Xamarin Studio" on the Mac.
    2. Navigate to "Xamarin Studio > Check for Updates".
    3. Select "Update channel > Stable" in the dialog.
    4. Click the "Switch channel" button.
    5. Proceed to download and install the Stable products.
    Note: Visual Studio for Mac Preview 6 will not be able to run in this configuration because it requires the Mono 5.0 Alpha version.
  • JoeHealyJoeHealy Joe Healy US ✭✭

    Upgraded Vs2017 to 15.1 ( 26403.3) ….
    Upgrade Mac to Xamarin Studio 6.3 (build 863)….

    Problem went away.

  • asokasok as ok US

    @Thomas.Bienkowski & @JoeHealy I'm having same issue my Visual Studio versions are

    Xamarin (3f99c5a)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

    Xamarin.Android (b16fb82)
    Visual Studio extension to enable development for Xamarin.Android.

    Xamarin.iOS (7656cc6)
    Visual Studio extension to enable development for Xamarin.iOS.

    And my Visual Studio for Mac having Xamarin.iOS 10.10 version.How to solve this issue.
    Thank you.

  • cwphillicwphilli Colin Phillips US ✭✭✭

    Why has the workaround been removed? Cannot access on bugzilla...

  • LeandroFreitas.0537LeandroFreitas.0537 Leandro Freitas US

    I have the same problem

  • TertiumOrganumTertiumOrganum Tertium Organum US

    Guys, do you ever launch (stable!) release on your PCs/Macs before go online? Every single update of Xamarin in VS and then on Mac is a huge headache! Your update tools never work (thanx they give links for manual download), and when I update every single time I spend day or two to make it work. And many people have the same pain. Why does it happen?

  • AdamAdamczykAdamAdamczyk Adam Adamczyk PL

    thanks @Thomas.Bienkowski - by editing file Xamarin.iOS.Common.After.targets it helps me work on VS 2015 + VS for Mac X OS Preview

  • FabianModig.9433FabianModig.9433 Fabian Modig SE

    @Ashok.Veldi said:
    @asok I am also using Visual Studio for Mac.By Install the following package on the Mac to downgrade just Xamarin.iOS to the current Stable channel version: it is working fine.

    Fantastic advice, thank you very much!

  • rbmanian75rbmanian75 Balasubramanian Ramanathan US ✭✭
    downgrading xamarin.ios to 10.8 works. but unable to build if i use c# 7 in vs for mac preview in ios project
  • VijayaMallaVijayaMalla Vijaya Malla US
    edited May 6

    I think this only happens when the MacAgent is talking to a mac with VS for MAC installed. For all Xamarin Studio people, you can update/upgrade the xamarin version and it shall work.
    But for the VS for MAC people, followed the recommendation as mentioned above to downloaded this package
    and it worked fine.

  • BradSmelster.5783BradSmelster.5783 Jon Elster US ✭✭

    How do you upgrade?

  • BradSmelster.5783BradSmelster.5783 Jon Elster US ✭✭

    I just installed the current version.. this is crazy.. what a waste of time

  • UdaraAlwisUdaraAlwis Udara Alwis LK ✭✭
    edited May 8

    I'm posting this on 5/8/2017 I had the same exact issue, and I got it fixed by updating my Xamarin Studio to the latest stable version, 6.3 (build 863). No need to downgrade at all. :)
    And yes I am using VS2017 through parallels on a Mac Pro.
    Hope this helps someone. Cheers!

  • BalasubramanianRamanathanBalasubramanianRamanathan Balasubramanian Ramanathan US

    @Ashok.Veldi said:
    @asok I am also using Visual Studio for Mac.By Install the following package on the Mac to downgrade just Xamarin.iOS to the current Stable channel version: it is working fine.

    This works. But it is not possible to use c# 7 features. The project does not build in visual studio for mac but it working fine from vs2017 in windows.

  • RefkaBenmahmoudRefkaBenmahmoud Refka Benmahmoud US ✭✭✭

    @UdaraAlwis same for me , am updating now the xamarin studio on Mac

  • BorislavKulov.9713BorislavKulov.9713 Borislav Kulov BG

    I was having the same problem. I did the following steps to resolve the issue:

    • updated the Xamarin Forms from VS 2015 / Tools / Options / Xamarin / Other;
    • updated the VS 2017 from the Visual Studio Installer;
    • updated Xamarin Forms, etc. on the Mac from Xamarin Studio;
    • updated Xamarin Forms NuGet package to the latest stable version for all projects in the failing solution.

    I think if Xamarin Forms is updated to all places you shouldn't have problems. I think in my case updating the NuGet package fixed the issue.

  • RefkaBenmahmoudRefkaBenmahmoud Refka Benmahmoud US ✭✭✭

    i have updated every thing, but nothing works, i am still having this problem

  • serkan_CAKMAKserkan_CAKMAK serkan CAKMAK US ✭✭

    I hade same assembly conflict issue I fix with update than delete bin and obj folders and clean re bulit it work ok now

  • StevenCombsStevenCombs Steven Combs US ✭✭

    The workaround got me up and running as well.

  • GVxGVx Gerard van der Linden US ✭✭

    @Ashok.Veldi said:
    @asok I am also using Visual Studio for Mac.By Install the following package on the Mac to downgrade just Xamarin.iOS to the current Stable channel version: it is working fine.

    Thanks for this... It finally got me going again..... It's a shame it takes users to solve our problems instead of people from Xamarin considering they keep breaking it all in the first place....

  • AnderskerbergAnderskerberg Anders Åkerberg US
    edited May 22

    @Ashok.Veldi said:
    @asok I am also using Visual Studio for Mac.By Install the following package on the Mac to downgrade just Xamarin.iOS to the current Stable channel version: it is working fine.

    How is this a fix? It´s a workaround at best. Currently i hafto downgrade each time before a new build. Then upgrade to 10.10 again to be able to use simulator to develop. Is this the procedure of everyone else or am i missing something?

    I would not hafto do this if xamarin update was not included in VS updates, atleast then i could choose if i want to go bleeding edge or not.

Sign In or Register to comment.