Xamarin/Visual Studio 2017: which .net version to pick for mobile development?

后端 未结 2 1292
别跟我提以往
别跟我提以往 2021-01-19 16:17

I just started to develop with Visual Studio 2017 / Xamarin, Target platforms are Android and iOS.

I found no reference about whether there is any dependency between

相关标签:
2条回答
  • 2021-01-19 16:57

    The technical details behind would give you a long answer, but it might not be 100% correct.

    Mono supports multiple .NET profiles, but not the latest

    If you use Visual Studio for Mac to create a Mono project (console app for example) today (Feb 6, 2018), you should be able to see the newest .NET profile it supports is 4.7 (should be 4.7.0 to match .NET Framework), and C# language is 7.1.

    Note on Windows, .NET Framework 4.7.1 is out, and C# 7.2 is supported.

    Xamarin uses latest Mono

    The final build of your mobile apps (iOS or Android) would bundle the latest Mono runtime. Thus, the .NET profile and C# compiler you can use would be determined by that Mono version.

    So in your case today, you should be able to target .NET profile 4.7.0 and C# 7.1.

    0 讨论(0)
  • 2021-01-19 17:04

    The framework version of the shared library doesn't in any way affect the target framework for each device, it only affects which platform you could target and what .NET classes and methods are actually available in this library.

    0 讨论(0)
提交回复
热议问题