SuavePirate / Xamarin.Forms.Controls.FloatingActionButton

A custom view to create a FloatingActionButton for both Android and iOS as part of Material Design
MIT License
120 stars 38 forks source link

Circular Dependency in NuGet Package #9

Closed dagostinelli closed 6 years ago

dagostinelli commented 6 years ago

Do this: Install-Package SuaveControls.FloatingActionButton

Then you get this:

PM> Install-Package SuaveControls.FloatingActionButton

Attempting to gather dependency information for package 'SuaveControls.FloatingActionButton.2017.11.27' with respect to project 'Veronica.Android', targeting 'MonoAndroid,Version=v7.1'
Gathering dependency information took 1.55 sec
Attempting to resolve dependencies for package 'SuaveControls.FloatingActionButton.2017.11.27' with DependencyBehavior 'Lowest'
Install-Package : Circular dependency detected 'SuaveControls.FloatingActionButton 2017.11.27 => SuaveControls.FloatingActionButton 2017.11.27'.
At line:1 char:1
+ Install-Package SuaveControls.FloatingActionButton
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Time Elapsed: 00:00:01.9385645

I attempted to install it in the PCL, The Android and the iOS projects. I tried it from the console as well as from the Manage NuGet Packages GUI.

SuavePirate commented 6 years ago

Well that is odd. I'm not seeing this when installing on a new project. What type of PCL Profile are you trying to install it to? I'll do my best to reproduce it.

dagostinelli commented 6 years ago

Here's how I can repro it:

  1. Visual Studio 2017 -> New Project -> Visual C# -> Cross-Platform (choose .NET Framework 4.6.1) from the top menu, then pick Cross Platform App (Xamarin) -> Blank App + Xamarin.Forms + PCL (not Shared Project) -> Target Version (Windows 10 Fall Creators Update)

  2. Start the NuGet Package Mananger Console, set Default project to the PCL. Then: Install-Package SuaveControls.FloatingActionButton

I get the error about circular dependency.

jd-alexander commented 6 years ago

Getting a similar error. Bummer. had high hopes for this lib.

SuavePirate commented 6 years ago

Yeah, I'm going to look into this tonight. If I'm unable to resolve it quickly, your best bet is to clone the repo and reference the projects directly or build your own following my blog post from a while ago here: https://alexdunn.org/2017/04/26/xamarin-controls-xamarin-forms-floatingactionbutton-including-ios/ The control and renderer itself is incredibly simple, I probably just messed up the NuGet project somehow

ericbrunner commented 6 years ago

Just wanna install it in PCL,Profile=259 tomorrow. Hope it works. Thanks for sharing that library and the tutorial

shalinasanga commented 6 years ago

I already used this awesome control, but today when i tried to updated it this happens

Could not install package 'SuaveControls.FloatingActionButton 2017.11.27'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework.

I have installed xamarin 2.5.0.121934. and where this failed is in my portable class library which uses .Net Framework 4.5 Any help much appreciated !!!

SuavePirate commented 6 years ago

Fixed in https://www.nuget.org/packages/SuaveControls.FloatingActionButton/2018.1.5 For posterity, the issue was additional nuget info added to the meta data of the PCL in the library which made the nuget project think there was another nuget it needed to reference rather than the project itself....