1
votes

When I deploy a Classic WorkerRole inside a CloudService in Azure i get the following exception. Any insights?

It runs fine locally, but it crashes immediately during deployment.

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()

2

2 Answers

2
votes

Just had this issue myself and the root cause was the osFamily setting in ServicConfiguration.Cloud.csfg file. Mine was set to 2, which does not support .Net version 4.6.2

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

I changed mine to 5 and it all worked again.

0
votes

It was due to changing the .NET version to 4.6.2 in combination with the updated ServiceBus library 5.0.0.

Changed it back to .NET 4.5.2 and reverted Microsoft.Servicebus NuGet package from 5.0.0 to 3.4.2 and it works fine now.