xamarin-fingerprint icon indicating copy to clipboard operation
xamarin-fingerprint copied to clipboard

Plugin version 2.1.5 on Windows UWP reports "This functionality is not implemented in the portable version of this assembly"

Open RobbiewOnline opened this issue 2 years ago • 4 comments

Upgrading Plugin.Fingerprint from 2.1.4 to 2.1.5 on Windows UWP results in "'This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation".

Downgrading back to 2.1.4 runs without issue.

Steps to reproduce

  1. Upgrade from 2.1.4 to 2.1.5

  2. Re-run the project

  3. Invoke the UI that invokes ```FingerprintAvailability fingerprintAvailability = await CrossFingerprint.Current.GetAvailabilityAsync(); ``

Expected behavior

The biometrics popup should appear (on Windows UWP this is a PIN entry screen)

Actual behavior

An exception is reported "'This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation"

Crashlog

System.NotImplementedException
  HResult=0x80004001
  Message=This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.
  Source=Plugin.Fingerprint
  StackTrace:
   at Plugin.Fingerprint.CrossFingerprint.CreateFingerprint()
   at System.Lazy`1.PublicationOnlyViaFactory(LazyHelper initializer)
   at System.Lazy`1.CreateValue()
   at Plugin.Fingerprint.CrossFingerprint.get_Current()
   at myproject.Views.PreferencesPage.<>c__DisplayClass63_0.<<-ctor>b__1>d.MoveNext() in D:\GitHub\mycompany-myproject-appv2\app\myproject\myproject\Views\PreferencesPage.cs:line 187

Configuration

Version of the Plugin: e.g. 2.1.5

Platform: e.g. Only tried Windows UWP

Device: MSI Intel(R) Core(TM) i7-10870H CPU @ 2.20GHz 2.21 GHz Windows 11 Home 21H2

Additional Information

I have confirmed that the UWP project and shared project were both successfully updated...

Restoring packages for D:\GitHub\project-myproj-appv2\app\myproj\myproj\myproj.csproj...
Restoring packages for D:\GitHub\project-myproj-appv2\app\myproj\myproj.UWP\myproj.UWP.csproj...
Restoring packages for D:\GitHub\project-myproj-appv2\app\myproj\myproj.Droid\myproj.Droid.csproj...
Restoring packages for D:\GitHub\project-myproj-appv2\app\myproj\myproj.iOS\myproj.iOS.csproj...
Installing NuGet package Plugin.Fingerprint 2.1.5.
Writing assets file to disk. Path: D:\GitHub\project-myproj-appv2\app\myproj\myproj\obj\project.assets.json
Successfully uninstalled 'Plugin.Fingerprint 2.1.4' from myproj
Successfully installed 'Plugin.Fingerprint 2.1.5' to myproj
Executing nuget actions took 224 ms
Writing assets file to disk. Path: D:\GitHub\project-myproj-appv2\app\myproj\myproj.UWP\obj\project.assets.json
Successfully uninstalled 'Plugin.Fingerprint 2.1.4' from myproj.UWP
Successfully installed 'Plugin.Fingerprint 2.1.5' to myproj.UWP
Executing nuget actions took 2.62 sec
Writing assets file to disk. Path: D:\GitHub\project-myproj-appv2\app\myproj\myproj.iOS\obj\project.assets.json
Successfully uninstalled 'Plugin.Fingerprint 2.1.4' from myproj.iOS
Successfully installed 'Plugin.Fingerprint 2.1.5' to myproj.iOS
Executing nuget actions took 759 ms
Writing assets file to disk. Path: D:\GitHub\project-myproj-appv2\app\myproj\myproj.Droid\obj\project.assets.json
Successfully uninstalled 'Plugin.Fingerprint 2.1.4' from myproj.Droid
Successfully installed 'Plugin.Fingerprint 2.1.5' to myproj.Droid
Executing nuget actions took 4.09 sec
Time Elapsed: 00:00:08.3993250
========== Finished ==========

RobbiewOnline avatar Jun 08 '22 11:06 RobbiewOnline

Hi @devology-rob,

I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

smsissuechecker avatar Jun 08 '22 11:06 smsissuechecker

@devology-rob what's the target framework of your windows project?

smstuebe avatar Jun 08 '22 12:06 smstuebe

@devology-rob what's the target framework of your windows project?

In the Windows XF project

    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
    <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.19041.0</TargetPlatformVersion>
    <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>

Is that what you were looking for?

RobbiewOnline avatar Jun 08 '22 16:06 RobbiewOnline

Hi,

I still have this issue using 3.0.0-beta.1 or 2.1.5, I have to roll back to 2.1.4 for this NuGet to work on Windows UWP.

Let me know if I can help any further.

Kind regards, Rob.

RobbiewOnline avatar Jan 11 '23 13:01 RobbiewOnline