Closed avinash-ramireddy closed 5 years ago
maybe delete the bin/obj and clean and rebuild the solution.
I did many times and it's still happening. I am going to revert to previous commit and check if it is still happening.
What is your PageTypeValue ?
Can you create a new app and repo it for me with just that one setting so I have a small case to look at.
_Here PageTypeValue type is int but showing as !0 which is very strange._
I am trying to make repo but it's not happening there. That part is not working in live project.
Today I started working on it again to see what exactly is happening. So far I noticed that in debug mode it's crashing with Missingmethod exception as shown in image above and in release mode it's just empty.
Are you clearing when in release mode(meaning I put in release mode and build the solution it stored some value first time and then without uninstalling I build again in release mode. This time it cleared old value).
I am really trying to hard to simulate this.
Forget what I mentioned earlier. I am testing the combinations of debug/release against different versions(live version not the sample). and when I build again and again without uninstalling it's clearing old values (both debug and release) but when I unplug my device and just open the already installed app it's fine.
May be I am missing something here as it's been 8 months. Things might have changed
I don't think it's depending on .NET framework, right?
I didn't migrate to .NET Standard yet, it's still old .NET Framework 4.5
Maybe rename your key? Could be corrupt?
What type of project is it? If it is WPF or something that code hasn't changed forever.
I will try that now.
It's xamarin forms. There is new requirement now and I wanted to update packages first and this happened
I changed key name to something else and it's still happening same way. I am sorry I can't make repo (don't have same old framework anymore and latest is always pointing to create using .net standard while creating project assuming issue depends on the .NET type) and can't provide live version snippets as well.
Sorry, closed by mistake.
This may help you: http://www.developersite.org/1000-24593-Xamarin-Forms-overriding-OnAppearing-causes-app-to-crash
I’ve been researching trying to figure out my own error, but mine is DateTime related and lack of personal experience. Hope that site helps you!
I lied. I had other issues.
I went through the above link. But my key is not null.
I am seeing this issue as well. Investigating, will update...
I am updating from Xam.Plugins.Settings
nuget package 3.1.1
to 4.0.0.7
. That is the only change I have made.
In my Android and iOS csproj files, it removed the reference to Plugin.Settings.Abstractions
. This dll is not in any of the folders in my packages/Xam.Plugins.Settings.4.0.0.7/lib
folder, but it is in all of the folders in my packages/Xam.Plugins.Settings.3.1.1/lib
folder.
Error:
Unhandled Exception:
System.MissingMethodException: Plugin.Settings.Abstractions.ISettings Plugin.Settings.CrossSettings.get_Current()
at MyProject.SharedComponents.Services.Settings.get_IsLoadingDataFromBackup () [0x00000] in
Code:
public static bool IsLoadingDataFromBackup
{
get => AppSettings.GetValueOrDefault(nameof(IsLoadingDataFromBackup), false);
set => AppSettings.AddOrUpdateValue(nameof(IsLoadingDataFromBackup), value);
}
I have tried changing the name IsLoadingDataFromBackup
to no avail. I also tried making it a Boolean
instead of a bool
but that did not help. I am able to use GetValueOrDefault
with some other settings (int, string) that do not cause this issue, which may explain why you are unable to reproduce. Have you tried a bool setting?
I believe the problem is the missing dll and reference.
Uninstall and re-insall all yours and do a clean/rebuild.
It doesn't look like Xam.Plugins.Settings 4.0.0.7 is available on nuget anymore.
use the newer pre-releases.
Is this fixed? i am facing the same problem
Hi, I am using v2.5.8 from almost 8 months. It was working fine. Today I tried to update few packages and I noticed that Settings plugin is not working. It is giving following exception.
As you can see my type is int but showing as !0
Below are my objects
Here PageTypeValue type is int but showing as !0 which is very strange.
I tried to upgrade to v3.1.1(stable) and in this version it is not storing any value. Every time I open it's (another object which is string ) empty not the one I stored last time.
I will try to make repo as I have more pressing issues in my current project now. Note: I upgraded to vs2017 15.7.1 recently