error XA2002: Can not resolve reference: `Syncfusion.Buttons.XForms`, referenced by `MyProj`

Hi, 
Thanks for the awesome product.

I built my own Xamarin Forms NuGet package project "Nuget A" with several SfControls, and A was referenced in "Project B".
Nuget A goes well with building or running embedded sample project, but I'm getting the error from "Project B" about "Syncfusion.Buttons.XForms" as below.
-
error XA2002: Can not resolve reference: `Syncfusion.Buttons.XForms`, referenced by `Nuget A`. 
Please add a NuGet package or assembly reference for `Syncfusion.Buttons.XForms`, or remove the reference to `Nuget A`.
-

The error is NOT the problem. I resolved this by installing the "Syncfusion.Buttons.XForms" into "Project B".  
What confused me is that I also used SfListView, SfNavigationDrawer in my "Nuget A", no error pops up until the "Syncfusion.Buttons.XForms".

So my questions are:
1. What is the difference between these controls that makes me install "SfButtons" again in "Project B"?
2. And ideally, is there any workaround to avoid this kind of redundant references?

Thanks,
Shaw

3 Replies

DD Devakumar Dhanapoosanam Syncfusion Team May 7, 2020 10:46 AM UTC

Hi Shaw Yu, 
 
Greetings from Syncfusion.  
 
We would like to let you know that we have ensured the same by creating custom library with reference of SfButton and SfListView. If you want to use that custom class of SfButton and SfListView in your sample by referring that custom library, you must need a Package reference of SfButton and SfListView in your sample. It is not only needed for SfButton but also with SfListView and all other syncfusion controls 
 
Similar thing has been occurred while using the SfListView class reference with that custom library in our application 
 
The type 'SfListView' is defined in an assembly that is not referenced. You must add a reference to assembly 'Syncfusion.SfListView.XForms, Version=18.1451.0.48, Culture=neutral, PublicKeyToken=null'.  
 
To resolve that please add 'Syncfusion.Xamarin.SfListView’ package in your application. 
 
Regards, 
Devakumar D 



SY Shaw Yu May 7, 2020 09:04 PM UTC

All right, that's the case I didn't implement them properly then.
Thanks for your reply, Devakumar.

Shaw


DD Devakumar Dhanapoosanam Syncfusion Team May 10, 2020 12:59 PM UTC

Hi Shaw Yu, 
 
Thanks for the update. 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Devakumar D 


Loader.
Up arrow icon