CrossGeeks / GeofencePlugin

Geofence Plugin for Xamarin iOS and Android
MIT License
48 stars 22 forks source link

Error when I try to update the plugin #25

Closed RumbosN closed 4 years ago

RumbosN commented 4 years ago

When I try to update Plugin.Geofence 1.0.1 to 1.5.4 or 1.4.0 nuget throw:

Failed to add reference. The package 'Plugin.Geofence' tried to add a framework reference to 'System.Drawing.Common.dll' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance.
Reference unavailable.

Xamarin.Forms version 4.5.0.356

LeoArgy commented 4 years ago

Same problem here. Are you building with VS2019? I found this from @jamesmontemagno (https://github.com/Baseflow/XamarinMediaManager/issues/558)

if building in 2019 add

true

This will fix the nuget

LeoArgy commented 4 years ago

Dangit. It interpreted the dang code. <DisableExtraReferences>true</DisableExtraReferences>

jamesmontemagno commented 4 years ago

Easiest way it to ensure you have updated to Package References and then you won't have an issue.

RumbosN commented 4 years ago

@jamesmontemagno I solve this with:

  1. I changed in project.iOS/packages.config the GeofencePlugin version to 1.5.4
  2. In project.iOS.csproj remove <Reference Include="Plugin.Geofence.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"><HintPath>..\..\packages\Plugin.Geofence.1.0.1\lib\Xamarin.iOS10\Plugin.Geofence.Abstractions.dll</HintPath> </Reference> and changed the Plugin.Geofence referece to ` ..\..\packages\Plugin.Geofence.1.5.4\lib\xamarinios10\Plugin.Geofence.dll

    `