sthewissen / Xamarin.Forms.DebugRainbows

The package you didn't even know you needed!
MIT License
415 stars 33 forks source link

error XA2002: Can not resolve reference in Android Project #11

Closed PatGet closed 4 years ago

PatGet commented 5 years ago

By just adding the NuGet to my Shared Project iget the following Error in my Android Project:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1866,2): error XA2002: Can not resolve reference: Xamarin.Forms.DebugRainbows, referenced by XYZ. Please add a NuGet package or assembly reference for Xamarin.Forms.DebugRainbows, or remove the reference to XYZ.

If i add the Nuget to Android too it works. That should not be needed, right?

sthewissen commented 5 years ago

Indeed it shouldn't. There's no Android-specific code in there. A clean/rebuild/remove bin/obj didn't do the trick either?

npagare commented 5 years ago

Hi @sthewissen , I am facing the same error with v1.0.16 as well except it doesn't show the code of XA2002 but blank value in the "Error List" window.

image

A clean / rebuild / remove bin/obj didn't work.

Also, as you can see in the pic above, iOS build also started failing with the error shown in the pic. I am also using Prism 7.1 latest stable for my MVVM needs. The above iOS error is thrown only when I have DebugRainbows package added to my .net std project; but ironically, the build output says the conflict of versions in Prism library. But, removal of the DebugRainbows package from my solution removes all these errors.

I would really like to use the DebugRainbows package with app level setting to enable that feature during dev/test cycle of my app.

Thoughts ?

Thank you