How to use custom Xamarin.Forms library

Poli97Poli97 Member ✭✭

Sorry for the dumb question but I am new to the environment. I downloaded the Xamarin.Forms library from Git (github.com/xamarin/Xamarin.Forms) and I edited some Classes I needed to personalize (I just needed to edit Views.cs into Xamarin.Forms.Core). Now how can I install this modified Xamarin.Forms into one of my project, instead of using the one from NuGet package?

Answers

  • Dinesh_OfficialDinesh_Official Member ✭✭✭

    @Poli97 ,

    Procedure 1 :
    All you need is to generate the assemblies for the Xamarin Forms source in your branch which may take larger time to build or you may face errors in it and then create a nuget package accordingly. Refer the below link to create nuget package.

    https://docs.microsoft.com/en-us/xamarin/cross-platform/app-fundamentals/nuget-manual

    Procedure 2 :
    If you have specific requirement, create your own class and derive it from Xamarin.Forms.View. Instead of calling base, handle your logics on the respective method.

  • Poli97Poli97 Member ✭✭

    @Dinesh_Official said:
    @Poli97 ,

    Procedure 1 :
    All you need is to generate the assemblies for the Xamarin Forms source in your branch which may take larger time to build or you may face errors in it and then create a nuget package accordingly. Refer the below link to create nuget package.

    docs.microsoft.com/en-us/xamarin/cross-platform/app-fundamentals/nuget-manual

    Procedure 2 :
    If you have specific requirement, create your own class and derive it from Xamarin.Forms.View. Instead of calling base, handle your logics on the respective method.

    For procedure 1 I am not sure I understand how to create nuget package after building XF source, and I can't use procedure 2 because I need to use the base, not derive the class.

Sign In or Register to comment.