my web app is working fine on localhost, but when I publish it on Azure, I get the following error:
Could not load file or assembly 'System.IdentityModel.Tokens.Jwt' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
On a localhost is working fine.
I am using 4.5 framework, and it is definned in web.config file too. I tried to reinstall it in nuget manager but I get
Package 'System.IdentityModel.Tokens.Jwt.4.0.2.206221351' already exists in project 'project1'
I also can't find this assembly in references folder. This is the first time I have expirienced this type of a problem.
What do you recommend me to do?
Regards, Sandi
There is a known issue in Azure Functions host: https://github.com/Azure/azure-functions-host/issues/5894
The current workaround is to add the following to your .csproj:
<PropertyGroup>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
I have figured it out. I updated System.IdentityModel.Tokens.Jwt reference via nuget package manager and it works again.
Regards!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With