Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly 'System.Private.ServiceModel' in Azure Function v2

I used a v2 azure function (durable function) with custom dll (.net core 2.2) that calls a service and I get the following exception:

Could not load file or assembly 'System.Private.ServiceModel, Version=4.1.2.4, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

In the debugging process, I can't step into the method and the exception is thrown without letting me inside it and I don't know exactly what tried to access that library. Putting manually the package from .nuget in the bin folder didn't work and the strange thing is that if a run the same code with a sample C# function it works.

like image 775
Razvan Nitu Avatar asked Jul 11 '19 08:07

Razvan Nitu


1 Answers

fixed Nuget Install or Update System.Private.ServiceModel

Install-Package System.Private.ServiceModel -Version 4.7.0

https://www.nuget.org/packages/System.Private.ServiceModel/

like image 176
Nader Gharibian Fard Avatar answered Sep 23 '22 07:09

Nader Gharibian Fard