xamarin / XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.58k stars 471 forks source link

[Bug] Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with xamarinios10, monoandroid10.0, netstandard2.0, netstandard2.1 #1572

Open JunkyXL86 opened 3 years ago

JunkyXL86 commented 3 years ago

Description

Developing my app on Visual Studio 2019 16.10.4 using Xamarin.Forms 5.0.0.2012. After updating to 2019 16.11, updating to Visual Studio 2022 Preview 3 and installing the latest MAUI workloads yesterday using maui-check (.NET 6 Preview 7) my app stopped building because of NuGet Package Xamarin.CommunityToolkit.Markup 1.2.0 that could not be resolved anymore. Reinstalling the Markup package produced following errors:

NU1202: Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0). Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks.
NU1202: Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win. Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks.
NU1202: Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x64. Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks.
NU1202: Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with xamarinios10 (Xamarin.iOS,Version=v1.0) / win-x86. Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks.
NU1202: Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with monoandroid10.0 (MonoAndroid,Version=v10.0). Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks.
NU1202: Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with netstandard2.1 (.NETStandard,Version=v2.1). Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks.

Tried to downgrade to .NET Standard 2.0 but same error messages accordingly

...
NU1202: Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks.

Downgrading XCT.Markup to 1.1.0 works. App will also start debugging.

Steps to Reproduce

Basic Information

Edit: attached screenshot xctm "Package Xamarin.CommunityToolkit.Markup 1.2.0 is not compatible with netstandard2.1 (.NETStandard,Version=v2.1). Package Xamarin.CommunityToolkit.Markup 1.2.0 does not support any target frameworks."

pictos commented 3 years ago

@JunkyXL86 If I'm not wrong you should install the Markup package just in your shared project. There's no need to install them into the platform projects.

JunkyXL86 commented 3 years ago

I didn't even install it in the Android proj. As I said, error occurs when I try to install the package in the shared project. I tried it over and over again using VS 2019 16.11 and VS 2022 P3. New clean fresh Xamarin.Forms Mobile App, simply try to install the XCT.Markup 1.2 package.

pictos commented 3 years ago

@JunkyXL86 could you attach a small repro? I couldn't reproduce the error

JunkyXL86 commented 3 years ago

@pictos I tested it again today (09/01/21) with the newest VS update. Still facing the issue. Maybe something is broken on my old machine. As the error is pretty certain, I'm still interested what the real cause is.

Meanwhile I got a new PC, Windows 11. On this machine using VS 2022 Preview 3.1 installing XCT.Markup 1.2 works as expected.

I've attached the Solution and a GIF showing the steps. Nothing special to it. XCT.Markup.1.2.zip XCT Markup 1 2

pictos commented 3 years ago

@JunkyXL86 I tried to reproduce it and everything works as expected. This error is very odd, since our package has a dependency on .netstandard 2.0. So this should be something in your environment.