问题
My Xamarin form apps was running like 5 minutes ago then all of sudden it stop working. The apps close instantly after it started. Below shows message display at Visual studio output,
Assembly Loader probing location: 'System.Buffers'.
Could not load assembly 'System.Buffers' during startup registration.
This might be due to an invalid debug installation.
A common cause is to 'adb install' the app directly instead of doing from the IDE.
Things that I tried but failed to resolve the problem,
- Reinstall System.Buffer from Nuget package.
- Clean bin and obj folder of android
- Unchecked use shared runtime at Android options
- Clean solution and rebuild solution
Forum that I referred
- https://forums.xamarin.com/discussion/115983/stuck-on-error-could-not-load-assembly-system-buffers-during-startup-registration
- https://forums.xamarin.com/discussion/63584/android-could-not-load-assembly-xxx-during-startup-registration
- https://bugzilla.xamarin.com/show_bug.cgi?id=44518
Can anyone helps me? Thanks in advance
回答1:
I have found the solution from one of the forum.
Uninstall System.Buffer
and install System.Memory
using NuGet package to your project and its done. Hope it helps you.
回答2:
I have solved this issue in little bit different manner. I have installed System.Memory
from NuGet package manager without uninstalling System.Buffer
. Then only error is gone. If I am uninstalling System.Buffer
I still face the same issue.
来源:https://stackoverflow.com/questions/49297409/could-not-load-assembly-system-buffers-during-startup-registration