Could not load assembly 'System.Buffers' during startup registration

依然范特西╮ 提交于 2021-01-28 01:48:12

问题


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,

  1. Reinstall System.Buffer from Nuget package.
  2. Clean bin and obj folder of android
  3. Unchecked use shared runtime at Android options
  4. Clean solution and rebuild solution

Forum that I referred

  1. https://forums.xamarin.com/discussion/115983/stuck-on-error-could-not-load-assembly-system-buffers-during-startup-registration
  2. https://forums.xamarin.com/discussion/63584/android-could-not-load-assembly-xxx-during-startup-registration
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!