将.Net框架从4.6.2迁移到4.7.2后,Azure云服务无法工作

问题描述 投票:0回答:1

我将.Net框架版本从4.6.2迁移到4.7.2后,本地运行没有问题。但是,当我发布到 Azure 云服务时,应该出现问题,因此服务总线消息移至死信队列。我已经选择了 osFamily 到 6 (Windows Server 2019),这有什么问题吗?

如果我选择返回 Windows Server 2016,启动服务时会出现以下错误:

未处理的异常:找不到方法:“Void Microsoft.Azure.KeyVault.KeyVaultClient..ctor(AuthenticationCallback,System.Net.Http.DelegatingHandler[])”。在 Topo.SettingsContext.GetKeyVaultClient(ClientAssertionCertificateassertionCert) 处...

之后,我也尝试了以下方法在WorkerRole中手动安装.Net框架,但仍然失败: https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-startup-tasks-common

azure azureservicebus azure-cloud-services .net-4.7.2
1个回答
1
投票

云服务上默认不安装 Net Framwork 4.7.2。

您可以按照这篇文章进行安装:

基本上你需要:

  1. 在您的项目中包含网络安装程序。
  2. 添加启动任务以在部署过程中运行安装程序。
© www.soinside.com 2019 - 2024. All rights reserved.