Hi.
I'm trying to create a Xamarin.Mac application using the Pkcs11Interop library. First I created the Cocoa app then created .NetStandart lib and imported the NuGet package Pkcs11Interop there.
But when I tried to use the library with the imported nuget package, I get an error:
Here is the code of the test library:
using System;
using Net.Pkcs11Interop.Common;
using Net.Pkcs11Interop.HighLevelAPI80;
namespace ReaderLib
{
public class Initialize
{
public Initialize()
{
Pkcs11 pkcs11 = new Pkcs11("/usr/local/lib/libbeidpkcs11.dylib", AppType.MultiThreaded);
}
}
}
Code ViewController
using System;
using AppKit;
using Foundation;
using ReaderLib;
namespace IDReader
{
public partial class ViewController : NSViewController
{
public ViewController(IntPtr handle) : base(handle)
{
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
Initialize class1 = new Initialize();
}
public override NSObject RepresentedObject
{
get
{
return base.RepresentedObject;
}
set
{
base.RepresentedObject = value;
// Update the view, if already loaded.
}
}
}
}