Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
235 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...