-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Standard Support #75
Comments
Just an internal note: This could be worth looking into as a point of starting ... jamesmontemagno/DeviceInfoPlugin#28 |
@manikandantk88 I haven't had any problems ... I just needed to add the nuget-package to every of the native projects and I was able to use it. If it doesn't for you, please show me the error you're facing. Maybe this helps you? https://solidbrain.com/2017/09/12/xamarin-is-it-time-to-move-from-pcl-to-net-standard/ (scroll down to It advises you to add the following XML to the <PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10</PackageTargetFallback>
</PropertyGroup> But as said, I didn't have to do it. It only avoids the warning you might get when adding this package. |
@manikandantk88 I've now myself tried to add my NuGet package to a plain project targeting Does this solve it for you? |
@SimonSimCity Thank you for response. I checked. It is resolved when I configure below in my project <PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10</PackageTargetFallback>
</PropertyGroup> |
Hi @SimonSimCity, I have a similar issue with my PCL that is targeting .NET Standard 2.0. The .csproj of this last one is already containing a similar code that you previously shared:
Even by doing so, I still got the next warning:
Could you help me this ? :) |
The latest version of this package is compatible with the following target: Maybe this can also help ... https://stackoverflow.com/questions/45569378/upgrading-to-net-core-2-0-packagetargetfallback-and-assettargetfallback-cannot Let me know if you still can't add it after replacing (or removing, as proposed in the stackoverflow answer) the line. |
I tried both of these solutions and also to replace PackageTargetFallback by AssetTargetFallback, but nothing changed. Just want to precise that I added successfully the package, but the compilation of my project is leading to the given warning (cf. above). Another idea maybe ? I thank you one more time for everything ! |
@toussam Since I haven't had time to get back on this yet, would you have some time to start on a PR which allows this package to be used on .NET Standard 2.0 projects? I'd be happy to merge your PR or allow you to do it yourself, but I'd like to see your commitment to this problem first 😉 |
FYI see #121 |
Not able to install this plugin in .NET Standard based Xamarin Forms project
The text was updated successfully, but these errors were encountered: