简体   繁体   中英

System.MissingMethodException: Method 'System.Collections.Generic.Dictionary`2.GetValueOrDefault' not found

I'm working on Xamarin.droid application which was running fine till yesterday. But suddenly when I try to run the code I'm getting the exception on runtime once the project started to run on device

System.MissingMethodException: Method 'System.Collections.Generic.Dictionary`2.GetValueOrDefault' not found.

I removed all the code changes and let it be in the previous working state.
Cleaned and rebuilt the project.
Removed bin and obj folders.
Linker property is already set to "None".
Removed unnecessary packages.
Restarted Visual studio. Restarted the system. But still no use.

Using Visual studio enterprise 15.5.7.

Any help is appreciated...

Edited: It got resolved in my case. I run the app from VS, it throws the exception. Then I opened the app settings and cleared cache/data. Then opened the app. It worked as expected. Then run the app from VS. Then also it worked without throwing the exception. But don't know what exactly went wrong previously.

在大多数情况下,我使用Xamarin看到此异常,这与Linker配置和编译器优化有关。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM