gpt4 book ai didi

c# - Microsoft 云服务/辅助角色部署 - 未找到方法?

转载 作者:行者123 更新时间:2023-12-03 01:42:30 25 4
gpt4 key购买 nike

当我在 Azure 中的 CloudService 中部署经典 WorkerRole 时,出现以下异常。有什么见解吗?

它在本地运行良好,但在部署过程中立即崩溃。

15:05:35 - Instance 0 of role Updater is busy Details: Starting role...Unhandled Exception: Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object, System.Object)'. at Microsoft.ServiceBus.Messaging.Configuration.KeyValueConfigurationManager.Validate() at Microsoft.ServiceBus.Messaging.Configuration.KeyValueConfigurationManager.CreateNamespaceManager() at Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(String connectionString) at PricingUpdater.WorkerRole.OnStart() in WorkerRole.cs:line 107 at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum) at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b__0() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

最佳答案

我自己也遇到了这个问题,根本原因是 ServicConfiguration.Cloud.csfg 文件中的 osFamily 设置。我的设置为2,不支持.Net版本4.6.2

https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-guestos-update-matrix#releases

我将我的更改为 5,一切又恢复正常了。

关于c# - Microsoft 云服务/辅助角色部署 - 未找到方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51708479/

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