gpt4 book ai didi

Azure 移动服务 - System.PlatformNotSupportedException

转载 作者:行者123 更新时间:2023-12-03 04:21:26 32 4
gpt4 key购买 nike

我正在使用 azure 开发 xamarin 表单应用程序,但是当我加载初始页面时,它崩溃了:

public static MobileServiceClient MobileService =
new MobileServiceClient(
"https://myapp.azurewebsites.net");

异常(exception):

System.PlatformNotSupportedException "The empty PCL implementation for Microsoft Azure Mobile Services was loaded. Ensure you have added nuget package to each of your platform projects."

如何解决这个问题?

最佳答案

这可能意味着 NuGet 包未在您的平台之一中正确安装。我建议做 force-reinstall of all NuGet packages使用包管理器控制台(工具/NuGet包管理器/包管理器控制台)。

Update-Package -reinstall

对解决方案中的所有项目执行此操作。完成后,关闭并重新打开 Visual Studio,打开解决方案并单击顶部菜单中的Build,然后执行Clean Solution

现在依次查看每个平台项目,看看其中是否有 Microsoft.Azure.Mobile.Client 引用:

NuGet reference

如果不存在,请在给定项目中再次安装 Microsoft.Azure.Mobile.Client 包。

然后,您应该按照有关 Azure 移动服务的任何教程中的说明继续操作。即使您在 Xamarin.Forms 应用中使用共享项目策略,一旦平台项目安装了 Microsoft.Azure.Mobile.Client,它也应该按预期工作。

如果没有帮助,作为最后的手段,我建议尝试将所有 NuGet 包更新到最新版本(右键单击解决方案,管理解决方案的 NuGet 包...)

关于Azure 移动服务 - System.PlatformNotSupportedException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48359028/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com