Microsoft 云 service/worker 角色部署 - 找不到方法?
Microsoft cloud service/worker role deployment - Method not found?
当我在 Azure 的 CloudService 中部署 Classic 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()
这是由于将 .NET 版本更改为 4.6.2 并结合更新的 ServiceBus 库 5.0.0。
将其改回 .NET 4.5.2 并将 Microsoft.Servicebus NuGet 包从 5.0.0 恢复到 3.4.2,现在可以正常工作了。
我自己刚遇到这个问题,根本原因是 ServicConfiguration.Cloud.csfg 文件中的 osFamily 设置。我的设置为2,不支持.Net版本4.6.2
https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-guestos-update-matrix#releases
我把我的改成了 5,然后一切又好了。
当我在 Azure 的 CloudService 中部署 Classic 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()
这是由于将 .NET 版本更改为 4.6.2 并结合更新的 ServiceBus 库 5.0.0。
将其改回 .NET 4.5.2 并将 Microsoft.Servicebus NuGet 包从 5.0.0 恢复到 3.4.2,现在可以正常工作了。
我自己刚遇到这个问题,根本原因是 ServicConfiguration.Cloud.csfg 文件中的 osFamily 设置。我的设置为2,不支持.Net版本4.6.2
https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-guestos-update-matrix#releases
我把我的改成了 5,然后一切又好了。