Reputation: 93
I'm using .Net Standart for Azure Function which is working with Service Bus handling messages. Once my function get run i experienced the following exception:
Microsoft.ServiceBus: The type initializer for 'Microsoft.ServiceBus.Messaging.Constants' threw an exception. Microsoft.ServiceBus: Could not load type 'System.UriTemplate' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
I have installed following packages:
1. Microsoft.Azure.WebJobs
2.Microsoft.Azure.WebJobs.ServiceBus
3.System.ServiceModel.Primitives
Any ideas why it can happen?
Upvotes: 3
Views: 2382
Reputation: 726
Please try workaround mentioned in issue https://github.com/dotnet/wcf/issues/2824
Upvotes: -1