Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

Can Xamarin IOS or Xamarin Android project reference a .NET 5 or .NET Core project

I have a Xamarin Native mobile app with Android and IOS projects and some shared projects, which are targeting .NET Standard 2.0

Honestly, I've tried to find any info about possibility to use .NET 5 projects with Xamarin native - but found no concrete statements in official docs.

I've tried to change target framework of my shared projects to net5.0 or netcoreapp3.1 but got an error:

Project SharedPcl is not compatible with monoandroid10.0 (MonoAndroid,Version=v10.0). Project SharedPcl supports: net5.0 (.NETCoreApp,Version=v5.0)

I understand the error message, but maybe I'm missing something? For example, retarget Android and IOS projects (Android targets 10, and IOS targets 10.3).

Thanks and sorry for possibly dumb question :)

question from:https://stackoverflow.com/questions/65885771/can-xamarin-ios-or-xamarin-android-project-reference-a-net-5-or-net-core-proje

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

According to How to target "Mobile App(Xamarin.Forms)" project to .net 5.0 in VS2019 (Version 16.8.0)? (thaks magicandre1981) it seems that untill .NET 6 we can't use projects, other than .NET Standard in Xamarin


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...