The root assembly conflicts with another assembly

Ashok.VeldiAshok.Veldi USMember ✭✭
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

«1

Answers

  • GotchaBroGotchaBro USMember

    same here +1

  • Mike.4896Mike.4896 USMember

    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 USUniversity ✭✭

    same here

  • HomeroLaraHomeroLara USUniversity, Developer Group Leader ✭✭

    I believe there is a work around for this here: https://bugzilla.xamarin.com/show_bug.cgi?id=54576

  • EEWEEW USMember

    Did I do this right? Line 85

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

    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/MFADynamicFormsMobileiOS.app/.monotouch-32/Mono.Security.dll [External]
    Loaded assembly: /private/var/containers/Bundle/Application/D1CE63BD-905B-421C-B506-E30EC9E2A96D/MFADynamicFormsMobileiOS.app/.monotouch-32/System.dll [External]
    Loaded assembly: /private/var/containers/Bundle/Application/D1CE63BD-905B-421C-B506-E30EC9E2A96D/MFADynamicFormsMobileiOS.app/.monotouch-32/Xamarin.iOS.dll [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 USMember ✭✭
    edited April 11

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

  • jebkisjebkis DEMember

    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 GBMember ✭✭

    Actually, here's an explanation and a proper fix for this from Brendan Zagaeski https://bugzilla.xamarin.com/show_bug.cgi?id=54993:

    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 USUniversity ✭✭

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

    Problem went away.

  • asokasok USMember ✭✭

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

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

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

    Xamarin.iOS 10.8.0.174 (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 USMember ✭✭✭

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

  • I have the same problem

  • AdamAdamczykAdamAdamczyk PLMember

    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 SEUniversity

    @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:

    https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-10.8.0.175.pkg it is working fine.

    Fantastic advice, thank you very much!

  • rbmanian75rbmanian75 USMember ✭✭
    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 USMember
    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
    https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-10.8.0.175.pkg
    and it worked fine.

  • BradSmelster.5783BradSmelster.5783 USMember ✭✭

    How do you upgrade?

  • BradSmelster.5783BradSmelster.5783 USMember ✭✭

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

  • UdaraAlwisUdaraAlwis LKMember ✭✭
    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!

  • @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:

    https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-10.8.0.175.pkg 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 USMember ✭✭✭

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

  • BorislavKulov.9713BorislavKulov.9713 BGMember

    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 USMember ✭✭✭

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

  • serkan_CAKMAKserkan_CAKMAK USMember ✭✭

    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 USUniversity ✭✭

    The workaround got me up and running as well.

  • GVxGVx USMember ✭✭✭

    @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:

    https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-10.8.0.175.pkg 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 USMember
    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:

    https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-10.8.0.175.pkg 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.

  • Geir-OveGeir-Ove NOMember ✭✭

    I still cannot build for iOS. Tried so many things, and have now lost track of all changes. Frustrating, as we, the developers live from releasing Programs, not fixing the tools we are using....

    We have released a new tools for Xamarin & Windows: https://objective.no/VcaSdeHome, but need to release examples for both Android and iOS and later the other platforms. Currently we are unable to compile our last iOS examples....

  • nafetsstefannafetsstefan USMember

    I solved the problem by updating Xamarin for Visual Studio manually. I needed to install the Xamarin Updater Plugin and update all Components manually (see https://blog.xamarin.com/staying-date-visual-studio-2017-xamarin-updater/).

    Make sure that the Xamarin.iOS version on the Mac and in Visual Studio are the same!

  • Geir-OveGeir-Ove NOMember ✭✭
    edited May 30

    I currently have Xamarin Studio installed with XCode 8.3.2, Xamarin iOS 10.10.0.36.

    Here I can read about the 10.10 release: https://developer.xamarin.com/releases/ios/xamarin.ios_10/xamarin.ios_10.10/

    But how do I download specifically iOS release 10.10.x to my PC ? (Using Visual Studio 2015)

    Here is the Downloads for each Platform: https://store.xamarin.com/account/my/subscription/downloads

    Latest iOS for windows is 4.5 ?? But which of these version numbers contains iOS 10.10 ??
    This is really confusing (and to top it off, we have the Release Cycle numbers....)

    Xamarin Team: Can you please make this easier for us Programmer that are only trying to Develop software and stay on top of things?

    There's more: if I look at the Nuget package installed on my iOS Project, it states that I can develop both iOS and Android apps, and lists lots of info about Androidm but not the general Android Version (e.g. 7.2.0.7 ) or anything about iOS at all.... COME ON, PLEASE Make this simpler for us, the Developers!

  • nafetsstefannafetsstefan USMember
    edited May 30

    What Xamarin.iOS version is shown in Visual Studio in Help -> About Microsoft Visual Studio?
    And can you update Xamarin using Tools -> Options -> Xamarin -> Update?

  • Geir-OveGeir-Ove NOMember ✭✭
    edited May 30

    @nafetsstefan said:

    What Xamarin.iOS version is shown in Visual Studio in Help -> About Microsoft Visual Studio?

    Yes, AFTER you have upgraded. That's a bit late: Hit and try: And, what if you find that your Android only works with version N, while iOS requires N+1 to work?

    And can you update Xamarin using Tools -> Options -> Xamarin -> Update?

    That updates BOTH VS, Android and iOS at the same time. As mentioned above: Maybe not what you need to do to get things working (as is mentioned by other people in other threads)

  • RobinSchroeder.8683RobinSchroeder.8683 USMember ✭✭

    I was just experiencing this exact problem after I switched from Xamarin Studio to Visual Studio for Mac on my build server. I also installed VS 2017 on my PC, but also still need to have VS 2015 running side-by-side for another project. As of this minute, I have everything updated from the stable channel. If you look closely, you will notice that the Xamarin.iOS version is slightly different on each one. But, the error has been resolved. I can build and deploy my various Xamarin.Forms projects using the same build server from VS 2015 and vs 2017, on the simulators and on devices.

    Here are the versions I am running (edited for just the parts that seemed relevant):

    On the PC:
    Microsoft Visual Studio Enterprise 2015
    Version 14.0.25431.01 Update 3
    Microsoft .NET Framework
    Version 4.6.01586
    Xamarin 4.5.0.476 (1be4f0c)
    Xamarin.Android 7.3.1.2 (9dbc4c5)
    Xamarin.iOS 10.10.0.35 (4cffddf)

    Microsoft Visual Studio Enterprise 2017
    Version 15.2 (26430.6) Release
    VisualStudio.15.Release/15.2.0+26430.6
    Microsoft .NET Framework
    Version 4.6.01586
    Xamarin 4.5.0.443 (c871575)
    Xamarin.Android SDK 7.3.0.13 (448f54f)
    Xamarin.iOS and Xamarin.Mac SDK 10.10.0.30 (30b6e87)
    Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

    On the Mac:
    === Visual Studio Community 2017 for Mac ===
    Version 7.0.1 (build 24)
    Runtime:
    Mono 5.0.1.1 (2017-02/5077205) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)
    === Xamarin.iOS ===
    Version: 10.10.0.36 (Visual Studio Community)

    Hash: d2270eec
    Branch: d15-2
    Build date: 2017-05-22 16:30:53-0400
    === Operating System ===
    Mac OS X 10.12.5
    Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

    And on another note:

    Sometimes, your plane is delayed for a bit on the tarmac and it is super-easy to get frustrated. But when you take a step back and remember that it is pretty miraculous that you will soon be launched thousands of feet above the earth in a huge mailing tube and delivered to a far away destination of your choice, all while someone serves you a drink, you tend to get a little more perspective. I think Xamarin is like this. The whole thing is frankly miraculous and sometimes we get stuck on the tarmac for a bit. If you set time aside in your sprints for updates and always have a rollback plan, the time sitting on the tarmac won't be so painful. :-)

    Hope that helps,Robin

  • Geir-OveGeir-Ove NOMember ✭✭
    edited May 31

    Thanks all for the feedback. Got up and running with iOS compiles again late at night / morning: 02:00 AM.
    Updated to latest version VS2015 (on Windows) updated Mac iOS alreadu on 10.10.
    Voila, it worked again, but lost a few milestones here...

    @RobinSchroeder.8683:
    Thanks, although I do agree that Xamarin is amazing:
    Sometimes when your flight is delayed, your business meeting abroad continues without you, and valuable business is lost....

    I think we would benefit from less frequent "Stable" releases: Maybe they could be called StableCuttingEdge, and when enough time has elapsed and bugs has been reported and ironed out, they could transition to StableForProduction...

  • RobinSchroeder.8683RobinSchroeder.8683 USMember ✭✭

    Completely agree @Geir-Ove
    I am really sorry to hear about your business meeting but glad to hear everything is working this morning. :-)

  • Geir-OveGeir-Ove NOMember ✭✭
    edited May 31

    @RobinSchroeder.8683 said:
    Completely agree @Geir-Ove
    I am really sorry to hear about your business meeting but glad to hear everything is working this morning. :-)

    The "business meeting" was a metaphor, like yours, but I missed promised release dates for some important trial customers.

    But again, I do think Xamarin is fantastic, that's exacty why we developed VcaSde that makes it even greater in IMO.

    And as most developers realize, Xamarin is a Complex undertaking and fantastic when it works like it does for me now...
    I am really impressed by being able to Debug into calls in my VcaSde Examples (on my Android Phone), and further into referenced VcaSde Assembly (SdRunX) when I point VS2015 to the source file! Amazing stuff!

  • PatrickLongPatrickLong USMember ✭✭

    I'd buy the whole "airplane" analogy IF they'd stop releasing new stuff and make what they have already currently "shipped" reliable but they don't because developing an app with a QR code to help me deploy my app makes a much better BUILD demo! (Xamarin Live Player)

«1
Sign In or Register to comment.