使用来自 iOS 和 Android Xamarin 项目的共享项目时的程序集引用问题

Assembly reference issue when using shared project from iOS and Android Xamarin projects

我正在为 iOS 和 Android 制作 Xamarin 中应用程序的通用 Windows 平台版本。与解决方案中的其他两个项目一样,我添加了一个名为 "Lib" 的共享项目作为参考,但是一旦我添加它,我就会收到很多关于缺少程序集引用的错误。例如 "The type or namespace name 'Serializable' could not be found (are you missing a using directive or an assembly reference?)"。 有没有人有在所有三个平台上使用共享项目的经验,也许可以帮助我解决这个问题?不知道我说的够不够清楚,但愿如此!

编辑:这似乎是一个问题,尤其是 System.dll 参考和其他一些 System.* dll。

UWP 中不存在序列化。看看改用 DataContractSerializer