1iveowl / Plugin.SegmentedControl

MIT License
170 stars 29 forks source link

Can't compile on UWP #87

Closed btschumy closed 4 years ago

btschumy commented 4 years ago

If I try compiling 4.5.1 for UWP, I get the following error:

Severity Code Description Project File Line Suppression State Error Could not copy the file "C:\Users\bill.nuget\packages\plugin.segmentedcontrol.netstandard\4.5.1\lib\uap10.0\Plugin.Segmented.Control.UWP\Plugin.Segmented.Control.UWP.xr.xml" because it was not found. OurGalaxyX.Windows

If I look at the files in the path, the "Plugin.Segmented.Control.UWP" directory is not present.

Any thoughts on how to fix?

NLGhofman commented 4 years ago

Some time has passed, did you find the trick to it? This one has been on my table for some days now.

btschumy commented 4 years ago

No, I haven't found a solution yet. Fortunately, I do not need the UWP version anytime soon. Still hoping the author might chime in on this.

btschumy commented 4 years ago

Still waiting for a solution to this...

btschumy commented 4 years ago

I downgraded to 4.2.0 and it does not have this error. It is only a temporary workaround. Perhaps there is something wrong with the 4.5.1 nuget package?

gtbuchanan commented 4 years ago

We abandoned this library for our project but I suspect the issue is here:

https://github.com/1iveowl/Plugin.SegmentedControl/commit/8d380d2b3fe7d01012ae565d10fbbdf8c03662f7#diff-81d8acf7236abf7954fdc3b290ad6b45L89

1iveowl commented 4 years ago

Sry for the long wait. I looked into it. Looks like an issue with the NuGet spec, which is now being fixed.

1iveowl commented 4 years ago

v5.2.0 should fix this. Let me know if this is not the case.

btschumy commented 4 years ago

1iveowl,

Yes, the 5.2.0 update did fix the problem where it wouldn't build on Windows. Thanks so much for fixing it.

However, it seems to have introduced a new problem. I now get the following package warnings:

Detected package downgrade: Xamarin.AndroidX.Lifecycle.Runtime from 2.2.0.1 to 2.1.0.1. Reference the package directly from the project to select a different version. OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Core 1.2.0.1 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.2.0.1) OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.1.0.1) Detected package downgrade: Xamarin.AndroidX.Lifecycle.Runtime from 2.2.0.1 to 2.1.0.1. Reference the package directly from the project to select a different version. OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Transition 1.3.1.1 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.2.0.1) OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.1.0.1) Detected package downgrade: Xamarin.AndroidX.Lifecycle.Runtime from 2.2.0.1 to 2.1.0.1. Reference the package directly from the project to select a different version. OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Fragment 1.2.4.1 -> Xamarin.AndroidX.Activity 1.1.0.1 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.2.0.1) OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Lifecycle.Runtime (>= 2.1.0.1) Detected package downgrade: Xamarin.AndroidX.Lifecycle.Common from 2.2.0.1 to 2.1.0.1. Reference the package directly from the project to select a different version. OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Fragment 1.2.4.1 -> Xamarin.AndroidX.Lifecycle.LiveData.Core 2.2.0.1 -> Xamarin.AndroidX.Lifecycle.Common (>= 2.2.0.1) OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Lifecycle.Common (>= 2.1.0.1) Detected package downgrade: Xamarin.AndroidX.Lifecycle.Common from 2.2.0.1 to 2.1.0.1. Reference the package directly from the project to select a different version. OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Lifecycle.LiveData 2.2.0.1 -> Xamarin.AndroidX.Lifecycle.LiveData.Core 2.2.0.1 -> Xamarin.AndroidX.Lifecycle.Common (>= 2.2.0.1) OurGalaxyX.Android -> Plugin.SegmentedControl.Netstandard 5.2.0 -> Xamarin.AndroidX.Lifecycle.Common (>= 2.1.0.1)

I'm new to nuget and am not sure what this means. Is this something you introduced? How can it be corrected?

In addition, I notice that the Windows version doesn't seem to respect the TextColor="Black" property that should make the the text of the non-selected segment black. I can live with this if that is just the way it is. However, I thought you might want to know.

1iveowl commented 4 years ago

Try updating you NuGet on you own project to latest AndriodX and let me know if that removes the warnings?

I'll have to look into the TextColor="Black" part.

1iveowl commented 4 years ago

Update. My bad. Looks like I made a mistake on the NuSpec file causing the Detected package downgrade: Xamarin.AndroidX.Lifecycle.Runtime from 2.2.0.1 to 2.1.0.1. issue.

Thank you for pointing this out. Has been fixed in v5.2.1.

1iveowl commented 4 years ago

UWP TextColor bug fixed in 5.2.2.

btschumy commented 4 years ago

I can confirm that 5.2.2 fix the warnings and also fixed the text color bug. Thanks again.

Bill