locked
create library targeting .net standard RRS feed

  • Question

  • User264557 posted

    hello,

    I want to create a new library that targeting .net standard, my question is, what is the template project that I should create?

    when I created class library project, I don't know how to add ios and android projects or should i create a normal xamarin.forms project that targeting .net standard and then build it in release mode? or should i create a shared code project?

    any idea?

    Tuesday, January 2, 2018 10:43 AM

Answers

  • User363160 posted

    Just go to File - New - Project - Select the Cross-platform Item - Choose Cross Platform App. Now you should be prompted with a box to choose a template. Just Select Xamarin.Forms as UI Technology and Code Sharing Strategy as .NET Standard. I hope this helps.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, January 3, 2018 10:13 AM
  • User240901 posted

    As the above answer states, you need a new solution, not just a library. Then it will automatically add the Android and iOS projects with it.

    As for shared project, you can select that option where you select .NET Standard but you can only have one or the other.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, January 3, 2018 1:45 PM

All replies

  • User363160 posted

    Just go to File - New - Project - Select the Cross-platform Item - Choose Cross Platform App. Now you should be prompted with a box to choose a template. Just Select Xamarin.Forms as UI Technology and Code Sharing Strategy as .NET Standard. I hope this helps.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, January 3, 2018 10:13 AM
  • User240901 posted

    As the above answer states, you need a new solution, not just a library. Then it will automatically add the Android and iOS projects with it.

    As for shared project, you can select that option where you select .NET Standard but you can only have one or the other.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, January 3, 2018 1:45 PM