Open MaxThom opened 4 years ago
The package must be added to any project which uses the SimpleStorage lib. It looks like the build error happens in your NUnit testing project. Have you added the lib there?
I dont have any NUnit project. I added the library to the shared library and the android.
Same problem. Package installed in all projects.
Using code in shared project App.xaml.cs
Error when trying to compile
Could you attach the csproj of your shared library? We normally use shared projects (.shproj with .projitems) which do not have the ability to add libraries by themself (see https://docs.microsoft.com/en-us/xamarin/cross-platform/app-fundamentals/shared-projects?tabs=macos). Do you have any particular requirement why you want to use a shared lib?
Sorry maybe I'm confused about terminology because I'm a beginner
I tried using blank Xamarin Forms template. Using your library code in a shared project (not in a shared library)
The project you added has a netstandard2.0 library for the shared code. When I create a blank Forms App I'll get a shared project (see screenshot). Unfortunately we currently have not time to add support for netstandard2.0 libs. I suggest you use a shared project. You should be able to just delete your lib project and add a shared project instead.
I am getting the same error using the version 1.4.27. In my project netstandard2.0 libs are also used, no shared project. As far as I read the description for 1.4.27, it supports now the net2.0, doesn't it? Thanks.
I added the net2.0 target but as you wrote that still does not work. Is it possible for you to switch to a shared project as Xamarin recommends?
Thanks for the feedback. Unfortunately it is a little late for that, project almost done :-) However I've solved my issue with Xamarin.Essentials.Preferences.
Thank you again.
Grüße
Hi,
I'm looking to use your plugin and I cant get my project to start. I get this error :
I added the nuget in my shared library and in the Android project. I also added the required line in the MainActivity.. Is is because of .NetFramework vs Standard ?
Ty If you have a solution or fix.