TheAlmightyBob / Calendars

Cross-platform calendar API plugin for Xamarin and Windows
MIT License
101 stars 23 forks source link

Add .NETStandard support for NuGet package #44

Closed coldacid closed 6 years ago

coldacid commented 6 years ago

Using this plugin with a .NETStandard Forms project results in a warning that the package "may not be fully compatible with [the] project" as it is restored using .NETFramework,Version=v4.6.1. The CClarke.Plugin.Calendars NuGet package should be updated to work properly with .NETStandard projects.

TheAlmightyBob commented 6 years ago

Interesting, thanks for reporting. I hadn't thought it was a problem for NETStandard projects to use PCLs.

coldacid commented 6 years ago

They can be referenced so long as PackageTargetFallback/AssetTargetFallback property in the NETStandard project file includes a target that the PCL can support, but the resulting library is only guaranteed to work on that fallback platform and will die anywhere else. The ability to use a PCL library from a NETStandard one is only intended as a temporary measure anyway.

TheAlmightyBob commented 6 years ago

@coldacid 0.6.45-beta should be more .NETStandard-friendly

jphellemons commented 6 years ago

I have this issue:

Could not load file or assembly 'Plugin.Calendars, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

as I've mentioned here https://github.com/TheAlmightyBob/Calendars/issues/48#issuecomment-383572779

Is that because if you start a new Xamarin Forms solution, you get .net Standard 2.0? and the 0.6.45 is not compatible (yet)? Or is this unrelated?

My csproj file contains:

<ItemGroup>
    <PackageReference Include="CClarke.Plugin.Calendars" Version="0.6.45-beta" />
TheAlmightyBob commented 6 years ago

@jphellemons What platform are you seeing this on? I was able to repro with UWP, but Android/iOS were fine.

jphellemons commented 6 years ago

It's UWP. Win 10 build 16299.371 fall creator update. Since Android and iOS require me to have physical devices or an emulator which is slow, so I mainly test/dev for uwp atm.

TheAlmightyBob commented 6 years ago

@jphellemons Okay, I think UWP support is simply broken right now. Would you mind creating a new issue?

(the Android emulator is a lot faster than it used to be... but yeah it's still not going to compete with UWP)