question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Method 'Plugin.Settings.Abstractions.ISettings.GetValueOrDefault' not found.

See original GitHub issue

I am using Xamarin.Forms 2.3.3.175. On iOS it works perfectly, yet on Android I get this message directly, without even seeing ui elements in my app.

public static string GeneralSettings
		{
			get
			{
				return AppSettings.GetValueOrDefault<string>(SettingsKey, SettingsDefault);
			}
			set
			{
				AppSettings.AddOrUpdateValue<string>(SettingsKey, value);
			}
		}

Bug

Version Number of Plugin:2.5.1.0 Device Tested On: Simulator Tested On: Accelerated x86 (default Visual Studio for Mac)

Expected Behavior

I can get a value from settings.

Actual Behavior

Before even accessing the string, I get “Method ‘Plugin.Settings.Abstractions.ISettings.GetValueOrDefault’ not found.”

Steps to reproduce the Behavior

Install the plugin in the PCL and Android. I run it, and get this error.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelmaireggercommented, Feb 20, 2017

@Thijmen What was the solution in your case? The project in #37 works.

Update By cleaning the solution the issue is now resolved

0reactions
dfoulkcommented, Aug 1, 2017

I ran into this after updating to 3.0.1 today. As @jamesmontemagno said, reinstall the package…

Method 1 Keeps your source control history clean

  1. Delete the ‘packages’ folder in your root folder (where your NuGet packages are stored locally)
  2. Restart Visual Studio

OR

Method 2 May clutter your source control history

Use the this guide to reinstall.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access Settings | SettingsPlugin
This feature is available as the SettingsAutoKeyExtensions class with extension methods in the Plugin.Settings.Abstractions.Extensions namespace.
Read more >
Xam.Plugins.Settings by James Montemagno doesn't seem ...
There is no "Save" for Xam.Plugins.Settings . Here is an example using a static class: using Plugin.Settings; using Plugin.Settings.
Read more >
Configuration Management - Xamarin
The ISettings.GetValueOrDefault method is used to retrieve a setting's value from platform-specific storage. If no value is defined for the ...
Read more >
Learn About User Settings In Xamarin.Forms
Additionally, it works with any Xamarin application, not just Xamarin.Forms. ... Settings plugin on all platforms through NuGet.
Read more >
Customizing a Xamarin Forms Application, Part 2
AddOrUpdateValue<string>(UserPasswordKey, value); } } private static Plugin.Settings.Abstractions.ISettings AppSettings { get { return ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found