We have had an Azure Function V3 that has a reference to another C# project in a VS 2019 solution. There are some extension methods in the other C# project using System.IdentityModel.Tokens.Jwt Version=5.6.0.0 assembly to perform token validation. The Azure Function has been working fine by using those extension methods to validate token. The following code snippet shows the nuget packages:
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.0.2" />
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventGrid" Version="2.1.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.3" />
We upgraded the nuget packages in the azure function according to the following list and started receiving the exception reflected the title of this ticket. What's the solution or workaround to solve this problem?
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.0.2" />
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventGrid" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.4" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.4" />
We also tried Microsoft.NET.Sdk.Functions version 3.0.5 but it exhibits the same problem What is the solution for this problem? Is this an issue to be fixed in the upgraded nuget package?