Xam.Plugin.Settings Nuget Package giving System.NotImplemented Exception when i am trying to Register using Autofac.
I am using Xam.Plugin.Settings nuget package to register user settings and i am registering that nuget package through Autofac with this code
var containerBuilder = new ContainerBuilder(); containerBuilder.RegisterInstance(CrossSettings.Current).ExternallyOwned()
.As<Isettings>(); in .NET MAUI ios App and i am using .net 8.0
Here is the Application Output For My ios Simulator where Exception is coming
Resolved pending breakpoint at 'MauiProgram.cs:27,1' to Microsoft.Maui.Hosting.MauiApp EHRSUIT.MauiProgram.CreateMauiApp () [0x00000].
2024-03-22 15:00:32.993936+0530 EHRSUIT[17885:269731]
Unhandled Exception:
System.NotImplementedException: 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.
at Plugin.Settings.CrossSettings.get_Current()
at EHRSUIT.MauiProgram.CreateMauiApp() in /Users/jigneshparmar/Projects/EHRSUIT/EHRSUIT/MauiProgram.cs:line 76
at EHRSUIT.AppDelegate.CreateMauiApp() in /Users/jigneshparmar/Projects/EHRSUIT/EHRSUIT/Platforms/iOS/AppDelegate.cs:line 11
at Microsoft.Maui.MauiUIApplicationDelegate.WillFinishLaunching(UIApplication application, NSDictionary launchOptions)
at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName)
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass)
at EHRSUIT.Program.Main(String[] args) in /Users/jigneshparmar/Projects/EHRSUIT/EHRSUIT/Platforms/iOS/Program.cs:line 13
2024-03-22 15:00:32.998055+0530 EHRSUIT[17885:269731] Unhandled managed exception: 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. (System.NotImplementedException)
at Plugin.Settings.CrossSettings.get_Current()
Appreciate any help to solve this