After I migrated .Net framework version from 4.6.2 to 4.7.2, there was no problem with I run locally. However, when I published to Azure Cloud Services, there should be something wrong so the service bus message moved to DeadLetter Queue. What's wrong is it as I chose osFamily to 6 (Windows Server 2019) already?
If I chose back Windows Server 2016, below error was out during starting the service:
Unhandled Exception: Method not found: ‘Void Microsoft.Azure.KeyVault.KeyVaultClient..ctor(AuthenticationCallback, System.Net.Http.DelegatingHandler[])‘. at Topo.SettingsContext.GetKeyVaultClient(ClientAssertionCertificate assertionCert) at ...
After that, I also tried below method to install .Net framework in WorkerRole manually but still failed: https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-startup-tasks-common