All Projects → brminnick → Improvexamarinbuildtimes

brminnick / Improvexamarinbuildtimes

Licence: mit
Tips and tricks on how to speed up the time it takes to compile a Xamarin app

Projects that are alternatives of or similar to Improvexamarinbuildtimes

Facialrecognitionlogin
An iOS and Android app that uses facial recognition to enhance the security of a login page. Built using Xamarin.Forms and Microsoft Cognitive Services.
Stars: ✭ 46 (-74.44%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Xamarin.forms.videoplayer
A Xamarin Forms control to render the native video player on every platform.
Stars: ✭ 140 (-22.22%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Awesome Xamarin
A curated list of awesome Xamarin iOS/Android and Xamarin Forms bindings, ports, frameworks and much more!
Stars: ✭ 394 (+118.89%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Xamarin Docs
Xamarin Documentation - public content repo
Stars: ✭ 136 (-24.44%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Ffimageloading
Image loading, caching & transforming library for Xamarin and Windows
Stars: ✭ 1,288 (+615.56%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Gittrends
A iOS and Android app to monitor the views and clones of your GitHub repos
Stars: ✭ 388 (+115.56%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Simpleauth
The Simplest way to Authenticate and make Rest API calls in .Net
Stars: ✭ 148 (-17.78%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Arcgis Runtime Samples Dotnet
Sample code for ArcGIS Runtime SDK for .NET – UWP, WPF, Xamarin.Android, Xamarin.iOS, and Xamarin.Forms
Stars: ✭ 274 (+52.22%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Xamuidemo
Xamarin Forms Login Page UI Kit
Stars: ✭ 82 (-54.44%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Faceoff
An iOS, Android and UWP app created in Xamarin.Forms that uses Microsoft's Cognitive Emotion API Services to compare facial expressions
Stars: ✭ 79 (-56.11%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Azure For Developers Workshop
The Azure cloud is huge and the vast service catalog may appear daunting at first, but it doesn’t have to be!
Stars: ✭ 38 (-78.89%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Microsoft.maui.graphics
Stars: ✭ 160 (-11.11%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Mvvmlight
The main purpose of the toolkit is to accelerate the creation and development of MVVM applications in Xamarin.Android, Xamarin.iOS, Xamarin.Forms, Windows 10 UWP, Windows Presentation Foundation (WPF), Silverlight, Windows Phone.
Stars: ✭ 973 (+440.56%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Plugin.audiorecorder
Audio Recorder plugin for Xamarin and Windows
Stars: ✭ 140 (-22.22%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Open Source Xamarin Apps
📱 Collaborative List of Open Source Xamarin Apps
Stars: ✭ 318 (+76.67%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Xamarin Bluetooth Le
Bluetooth LE plugin for Xamarin
Stars: ✭ 419 (+132.78%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
arcgis-runtime-demos-dotnet
Demo applications provided by the ArcGIS Runtime SDK for .NET Team
Stars: ✭ 51 (-71.67%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
xamarin-chat-signalr
Xamarin Forms Modern Chat Using SignalR ASP.NET
Stars: ✭ 12 (-93.33%)
Mutual labels:  xamarin, xamarin-forms, xamarin-ios, xamarin-android
Docs Archive
Xamarin docs archive
Stars: ✭ 553 (+207.22%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms
Xaml Code Experiences
A collection of the experiences I have collected during days of Xamarin and Wpf, while following the MVVM design pattern.
Stars: ✭ 114 (-36.67%)
Mutual labels:  xamarin, xamarin-android, xamarin-ios, xamarin-forms

Purpose

Sometimes Xamarin Build times can take a long time, adding delays to our development timeline. Below are tips to reduce the compilation time for Debug Configuration builds.

The screenshots below were created on 10 June 2017 using Visual Studio for Mac v7.0.1 and UITestSampleApp.

Disclaimer

These recommendations are only meant for Debug Configuration builds. They will reduce the time for each compilation, but may increase the size of the app and decrease the performance and load-time of the app.

I highly recommend utilizing the Linker for Release Configuration builds; Link SDKs and Frameworks is my recommended minimum setting. I also highly recommend heavily testing the Release Configuration build of the app because the app may behave differently when the Linker is utilized.

Additional Resources

Xamarin Videos

Xamarin.iOS Documention

Xamarin.Android Documentation

iOS Build Settings

iOS Build Settings

  • Linker behavior: Don’t Link for Simulator Builds, Link on Devices Builds

    • The Linker will reduce the amount of managed code which means less native code to AOT compile
    • Simulator builds don't AOT compile, but Device builds do AOT compile
  • Enable incremental builds

    • Allows the AOT compiler to compile only the code that changed
  • Enable device-specific builds

    • This encourages the compiler to only compile for the targeted device

    • This allows you to select many supported architectures

    • Selecting multiple architectures without enabling device-specific builds will cause compilation to take longer

      - X86_64 Architecture works for iPhone Simulators 5s and newer
      - i386 Architecture works for iPhone Simulators earlier than the iPhone 5s
      
  • Optimize PNG Images

    • The compiler will take extra time to complete the optimizations

Android Build Settings

General

Android Build Settings, General

  • Use Shared Mono Runtime
    • This will install Mono on the targeted device
    • Installing Mono on the device means that Mono doesn't have to be bundled in the APK, making the APK quicker to compile and deploy
  • Fast Assembly Deployment
    • Deploys assemblies to a directory on the device instead of bundling them in the APK
    • The APK compiles faster, is smaller, and is faster to deploy
    • Allows Xamarin to deploy individual changed assemblies instead of rebuilding/redeploying the entire APK

Linker

Android Build Settings, Linker

  • Linker Behavior: Link SDK assemblies only
    • The Linker will reduce the amount of managed code which means less native code to compile
    • Because Android uses emulators which behave similarly to Android devices, there isn't a recommended difference between Emulator & Device builds for the Linker settings like there is for iOS

Advanced

Android Build Settings, Advanced

  • Supported ABIs
    • Select the ABI for the targeted device
    • E.g. if you’re deploying to an x86 emulator, only select the x86 ABI

CSPROJ

Android CSProj File

NOTE: This is an experimental setting!

  • Add AndroidExplicitCrunch to the Droid csproj file
    • When this property is set, the build process pre-crunches the .png files
    • Requires Xamarin.Android 7.0+
    • If you are building an app with a very large number of local drawables, an initial build (or rebuild) can take minutes to complete. To speed up the build process, set AndroidExplicitCrunch property to true in the csproj file.
    • It is not known if this setting will truly speed up your build. Time your initial build, and then a second build with no changes. Make the call if the setting helps your app or not.

Project References

Edit References

  • Use shared projects instead of .NET Standard libraries
  • Compilation time increases for every referenced .NET Standard library
    • Referenced .NET Standard libraries will compile first, then the Startup Project will compile
    • Using Shared Projects allows the project to compile faster

Thank You

Thank you to all who have helped contribute to this doc!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].