Xamarin.UITest project targeting .NET Framework vs .NET Core (& .NET Standard implentation support) RRS feed

  • Question

  • User262242 posted

    Hi All,

    Quick question to do with target frameworks for Xamarin.UITest and other business logic unit testing projects.

    I had previously created a (.NET Framework) unit testing project for my business logic for an app and the unit testing project which was fine at the time and it wasnt until this week that I did some package updates and one of my packages being updated was using latest .NET Standard 2.1 which forced me to update my Xamarin.Forms shared project to also target 2.1 and I then I discovered that there is no implementation support with any .NET Framework with .net standard 2.1 which caused issues between both project Unit Testing project and my Forms project (below and here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard)

    In any event I migrated unit testing project for my business logic from .NET Framework to .NetCore and that resolved my issues and all worked fine again for both projects but when I went to create a new Xamarin.UITest project for another app i.e. "Xamarin.UITest Cross-Platform test project" it also targeted .NET Framework... am I wrong to begin migrating this to .NET Core as well?

    Why for example does Xamarin.UITest target .NET Framework that when according to a quick google search on .NET Framework vs NET Core:

    Is .NET core replacing .NET framework? net core will replace . net framework. For a longer answer, Microsoft is adding new features to the upcoming . net core 3 to include WinForms, WPF and more features and functions from .

    Shouldnt the move be away from .NET Framework? I feel like if the Xamarin.UITest is targeting the .Net Framework there must be a reason why so it just made me question my next move to migrate that also.

    Thursday, April 2, 2020 10:32 PM

All replies

  • User369979 posted

    Obviously, .Net Framework won't support .Net Standard 2.1 or later. We could try to build our Xamarin Forms application using .Net Standard 2.0. .Net Framework is not only used for UITest. It's not true that we can leave .Net Framework now. We still need it to develop ASP .Net. And UItest is different from Unit Test. You could choose what you want depending on your specific situations.

    Friday, April 3, 2020 10:09 AM
  • User262242 posted

    @LandLu thanks for the response, what about .Net Standard 2.1 now and in the future? Since I am already seeing plugins use .Net Standard 2.1

    I realized later it was possible to unit test with either Core or Framework but didnt give it to much thought at the time. I also understand UITest is different (been looking into that abit recently) but if only the option to create a "Xamarin.UITest Cross-Platform test project" with .Net Framework is available when creating new project with VS then is it a bad idea to migrate it to Core? Correct me if I am wrong on these. Thanks

    Monday, April 6, 2020 2:29 AM
  • User369979 posted

    I've no idea whether Xamarin.UITest will migrate to Core or .Net Standard. But now if you want it to be compatible with Xamarin Forms it's better to consume .Net Standard 2.0. At the end of this year, we will intend to release .Net 5: https://devblogs.microsoft.com/dotnet/introducing-net-5/

    Monday, April 6, 2020 9:13 AM