Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What projects need to reference the .Net Standard Library in a Cross Platform Solution

I am building a Cross Platform Application. A Xamarin Forms .Net Standard library with 3 implementations on Android, iOS and UWP.

I realise I have to reference the .Net Standard nuget package to build a .Net Standard Cross Platform project

This nuget is currently refrenced by my Xamarin.Forms Application (Through the .net Standard SDK) and also by my Android and iOS projects.

Now my question is, do the Android and iOS projects need to reference the .Net Standard library - I can't understand why they would.

I can't find any documentation on this to help me understand and I also don't want to be referencing more libraries than I have to on my project bulking up the packages

like image 901
User1 Avatar asked Jan 01 '26 10:01

User1


1 Answers

Only the .NET Standard SDK style project should use the NETStandard.Library NuGet package. This will be implicitly referenced by the .NET Standard project - you do not need to add an explicit reference to this NuGet package by installing it into the .NET Standard project.

The other iOS and Android projects just need to reference the .NET Standard project.

like image 65
Matt Ward Avatar answered Jan 06 '26 10:01

Matt Ward



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!