Forum Visual Studio
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Productivity & Efficiency Tips & Tricks?

GTCGTC Member ✭✭

Hey guys,

Our goal is to reduce code built & simulation time. Is there any (semi)official documentation highlighting all the options dev teams have in terms of optimization & performance? OOTB settings and those recurrent 10~30sec sim wait times are probably okay for a hobby dev however we seem to be struggling in finding ways to optimize productivity and efficiency in a corporate setting (significant $ losses).

If anyone have any magic settings, tips or tricks to get around this issue please share I'd really appreciate.
Thanks

Best Answer

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    Accepted Answer

    For xamarin forms, you can use Hot Reload to reduce the built & open simulator's time. when you change the code in xaml. then you save the code, the layout will update quickly, For more information, you can refe to the following link.

    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/hot-reload

    Enabled Fast Deployment in the project settings.

    You could enable new Fast Deployment feature in .csproj by adding this:

    <AndroidFastDeploymentType>Assemblies:Dexes</AndroidFastDeploymentType>
    

    This process speeds up the build/deploy/debug cycle because if only assemblies are changed, the package is not reinstalled. Please note that:

    It works only when when the $(EmbedAssembliesIntoApk) MSBuild property is False, you could find it here.

    Here is article about speed-up the build time you could find here:
    https://github.com/brminnick/ImproveXamarinBuildTimes

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    Accepted Answer

    For xamarin forms, you can use Hot Reload to reduce the built & open simulator's time. when you change the code in xaml. then you save the code, the layout will update quickly, For more information, you can refe to the following link.

    https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/hot-reload

    Enabled Fast Deployment in the project settings.

    You could enable new Fast Deployment feature in .csproj by adding this:

    <AndroidFastDeploymentType>Assemblies:Dexes</AndroidFastDeploymentType>
    

    This process speeds up the build/deploy/debug cycle because if only assemblies are changed, the package is not reinstalled. Please note that:

    It works only when when the $(EmbedAssembliesIntoApk) MSBuild property is False, you could find it here.

    Here is article about speed-up the build time you could find here:
    https://github.com/brminnick/ImproveXamarinBuildTimes

  • GTCGTC Member ✭✭

    Thanks Leon

  • batmacibatmaci DEMember ✭✭✭✭✭
    edited November 15

    @LeonLu this doesnt work for me <AndroidFastDeploymentType>Assemblies:Dexes</AndroidFastDeploymentType>
    I get error as

    The source file "obj\Debug\100\lp\25\jl\\classes.dex" does not exist.

    i have it already <EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>

Sign In or Register to comment.