Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Mono 6.0 problems with Release builds on iOS and Android

$
0
0

Hello guys,

In my Xamarin.Forms (Xamarin 4.2.0.673161-pre3) solution for Android and iOS after update to Mono 6.0 I noticed problem with Release builds.

iOS:
I can't build Release anymore (Debug works fine). Before in Mono 5.18 it works perfect, but since I upgraded VS version it stuck during build process. Same problem happen when I build Release in Microsoft App Center. If In build setting I select SDK version Xamarin.iOS 12.10 (Mono 5.18) everything works fine, build takes about 8 minutes, but if Xamarin.iOS 12.14 (Mono 6.0) is selected the build process stuck on the way and is canceled automatically after 45 minutes.

I tested in VS Community 2019 16.1.1 and VS for Mac Community 8.2.3. On Windows build never finished (even after the whole night, just stuck in some point and stop showing new messages in output window). On Mac after few hours build finished with 78868 errors. All looks similar:

MTOUCH : error MT5210: Native linking failed, undefined symbol: _mscorlib_System_ValueTuple_CombineHashCodes_int_int_int_int_int_int_int_int. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _mscorlib_System_ValueTuple_CompareTo_System_ValueTuple. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH : error MT5210: Native linking failed, undefined symbol: _mscorlib_System_ValueTuple_Equals_System_ValueTuple. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.

and it repeats 78868 times. Before when VS used Mono 5.18 it works fine.

Android
With Mono 6.0 Release building works, but App startup time is worst. When I use for same commit in Microsoft App Center to create build with SDK version Xamarin.Android 9.3 (Mono 5.18) the size of the app (with AOT enabled) is about 42,1 MB and start up time on fairly slow device (Redmi 7A) is about 3.5 seconds, but when I change to Xamarin.Android 9.4 (Mono 6.0), app size change to 30,3 MB what is nice, but startup time increase to 6.5 seconds. Actually it seems that with Mono 6.0 startup time without AOT and with AOT is similar, what is strange. My build config in project file looks like that:

        <DefineConstants>ANDROID</DefineConstants>
        <DebugSymbols>false</DebugSymbols>
        <DebugType>portable</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\Release</OutputPath>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
        <AndroidManagedSymbols>true</AndroidManagedSymbols>
        <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
        <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
        <AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis>
        <AndroidCreatePackagePerAbi>true</AndroidCreatePackagePerAbi>
        <AndroidUseAapt2>true</AndroidUseAapt2>
        <AotAssemblies>True</AotAssemblies>
        <AndroidAotAdditionalArguments>no-write-symbols,nodebug</AndroidAotAdditionalArguments>
        <EnableLLVM>True</EnableLLVM>
        <AndroidEnableProfiledAot>True</AndroidEnableProfiledAot>
        <BundleAssemblies>True</BundleAssemblies>
        <AndroidLinkTool>proguard</AndroidLinkTool>
        <AndroidEnableMultiDex>false</AndroidEnableMultiDex>
        <AndroidDexTool>dx</AndroidDexTool>
        <AndroidLinkMode>Full</AndroidLinkMode>
        <AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>

Anyone has any idea what may be the reason and how to fix it? Thank you in advance for any idea!


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>