Net Standard Library Xamarin.mac
So I was I upgrading one of my apps from PCL to .NET Standard and ran into some issues. I was about to ask a question here but I eventually managed to solve all issues myself. I will add my findings below anyways in case someone else runs into these same issues:
Jun 27, 2016 Building cross-platform libraries – The.NET Standard Library and the.NET Platform Standard. This new unification has been created in order to provide a more concrete guarantee of binary portability to future.NET-capable platforms with an easier-to-understand platform versioning plan. Aug 14, 2017 However, if you try to use your new shiny netstandard2 libraries with Xamarin.Mac (or iOS) you likely will run into a few issues as official support is scheduled for our next major release d15–4.
FYI: I am using Visual Studio for Mac 7.3.2
.NET Standard 2.0; I've packed the library with Nuget in a similar vein as the cross platform library project does it. Now when I create a new Xamarin Forms project and select.NET Standard as the means to share the code, I reference my nuget and try running it in the android simulator, I get. Apr 23, 2017 I have previously blogged about using.NET Standard with Xamarin Forms. Since then, the tooling has changed significantly with Visual Studio 2017 and Visual Studio for Mac. This post will show you what you need to use Xamarin.Forms with a.NET Standard class library. Why use a.NET Standard class library instead of a PCL? May 09, 2019 This was found with the preview channel on Visual Studio for Mac. I fixed my problem by switching to the stable channel but wanted to report this anyway. Steps to Reproduce Use Xamarin.Mac 5.10.150.0 Add a.NET Standard project to your s. Dec 12, 2018.NET standard is the set of API that is available on all.NET implementations, It will create some type of uniformness, a portability that supports.Net Core, Xamarin and.Net Framework. Basically, It is the set of Base class libraries (BCL) that support a wide range of technologies like.NET Framework,.NET Core, MONO, Xamarin, Mac, Android, Universal Windows Platform, Windows Phone etc.
I have found 2 ways to upgrade to .NET Standard:
1) Adding a new .NET Standard library and copy/pasting everything from my PCL library
2) Upgrading an existing PCL to .NET Standard library
1) Adding a new .NET Standard library and copy/pasting everything from my PCL library (watch this video)
1. Add a new .NET Standard library
2. Copy/paste all files from your PCL to the .NET Standard library
3. Add the Microsoft.Nre.Portable.Compatibility nuget package
4. Add the compatibility flag to the .csproj file
5. Add the required nuget Packages to the .NET Standard library
The above method is (kind of) OK for small projects but for larger projects it is not doable. So there should be a better way:
This tutorial will guide you through the process of moving an entire library of photos to an external drive, preferably to a much larger external hard drive, in a way that won’t disrupt your photography workflow. About Photos Library fileIn Photos, you can easily but can only work with one library at a time.If your Photos library is managed—that is, “Copy items to the Photos library” is selected in Photos → Preferences → General—every image you import to Photos or drop on its window will get copied to the Photos library.
2) Upgrading an existing PCL to .NET Standard library
If you double click the PCL project and look under Build > General, you can select .NET Standard Platform there. But if I do this I get multiple errors:
Xamarin.Forms targets have been imported multiple times. Check your project file and remove the duplicate imports.
I can solve this by removing this line from the .csproj file, but why is it even in there?: How to show library folder mac.Next, some of my packages aren't restored. If I take a look at the Package Console I see the following output:
This tells me that the Xam.Plugins.Settings package is not compatible so lets upgrade that. But if I remove the Xam.Plugins.Settings package and try to install the latest version I get the following error:
Xamarin Mac Download
I finally fixed this by going into my project.json and set the following:
'NETStandard.Library': '1.6.1'
This was my last error to fix and finally everything worked as it should.
Net Standard Library Xamarin.mac County
One thing I still don't quite understand is that if I compare the .csproj files of the newly created library and the upgraded library (of the same project) they are completely different. Also the upgraded project now has a project.json and the newly created library doesn't, any thoughts on this?