Xamarin Forms:对类型 'Assembly' 的引用声称它在 'System.Runtime' 中定义,但找不到

Xamarin Forms: Reference to type 'Assembly' claims it is defined in 'System.Runtime', but it could not be found

我的项目类型是便携类型。在 UWP 上部署项目时出现以下错误:

Reference to type 'Assembly' claims it is defined in 'System.Runtime', but it could not be found.

问题仅出在UWP部分。 Android 和 IOS 应用运行良好。

错误发生在以下行:

rendererAssemblies.AddRange(Rg.Plugins.Popup.Popup.GetExtraAssemblies());
Rg.Plugins.Popup.Popup.Init();
Xamarin.Forms.Forms.Init(e, rendererAssemblies);

尝试按照此 thread 将 Portable 项目类型转换为 .Net。但它抛出与包相关的错误。

我仍在寻找解决 Xamarin 的方法,如有任何解决此问题的指导,我们将不胜感激。

通过更新 Microsoft.NETCore.UniversalWindowsPlatform 并在 windows 项目下安装 NSIS-Tool 包解决了这个问题。