Why Xamarin.Forms provide support for .NET Standard 1 & .NET Standard 2 RRS feed

  • Question

  • User384698 posted

    I have custom control which using .NET Standard 1.0. Recently faced the Xaml previewer issue in VS2019 and to make the control visible in the designer, need to set [DesignTimeVisible (true)] attribute for control. But, DesignTimeVisible attribute is not available in .NET Standard 1.0 and have plans to move control to .NET Standard 2.0. Also, I have doubts why Xamarin.Forms provide support for both .NET Standard 1 & 2 rather than .NET Standard 2? If I move my control to .NET Standard 2.0 whether I will face any compatibility issue?

    Tuesday, April 16, 2019 6:05 PM

All replies

  • User53115 posted

    I believe the dual .NET Standard 1.0 and 2.0 support is accomplished by compiling the code twice. Your project will only consume one set of DLLs or the other depending on your target framework. There shouldn't be any compatibility issues as .NET Standard 2.0 projects are backwards-compatible with .NET Standard 1.0 packages.

    Tuesday, April 16, 2019 6:39 PM
  • User363989 posted

    @StephaneDelcroix  @SamanthaHouts @DavidOrtinau @JamesMontemagno     Could I please know is there any specify reason for targeting Xamarin.Forms to both .NET Standard 1 & 2.0. I have cross checked @JamesMontemagno’s “ImageCirclePlugin” project where it targets only .NET Standard 2.0 alone, whereas Xamarin.Forms project targeting both .NET Standard version. Could you please let me know is it Ok to set .NET Standard 2.0 alone for my custom control as minimum version? Will I be losing anything If I do so?

    Saturday, April 20, 2019 6:47 AM
  • User53115 posted

    You will be absolutely fine targeting .NET Standard 2.0.

    Monday, April 22, 2019 1:44 PM