usrere
usrere

Reputation: 93

Azure Function couldn't load 'System.UriTemplate'

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

Answers (1)

Pragna Gopa
Pragna Gopa

Reputation: 726

Please try workaround mentioned in issue https://github.com/dotnet/wcf/issues/2824

Upvotes: -1

Related Questions