0

I have an app that I try to deploy to Azure Functions. I am trying to use use <_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> as a solution for problem "Could not load file or assembly System.IdentityModel.Tokens.Jwt" in PropertyGroup. But when I add that there I cannot properly deploy my app to Azure.

   func azure functionapp publish <app-name>

And then, I get following error:

    Azure.Functions.Cli.Common.CliException: Error calling sync triggers (BadRequest). Request ID = '8352b514-e606-4316-b316-9ad47ad1e3b5'.
   at Azure.Functions.Cli.Helpers.RetryHelper.Retry(Func`1 func, Int32 retryCount, TimeSpan retryDelay, Boolean displayError) in D:\a\_work\1\s\src\Azure.Functions.Cli\Helpers\RetryHelper.cs:line 27
   at Azure.Functions.Cli.Actions.AzureActions.PublishFunctionAppAction.SyncTriggers(Site functionApp) in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\AzureActions\PublishFunctionAppAction.cs:line 520
   at Azure.Functions.Cli.Actions.AzureActions.PublishFunctionAppAction.PublishFunctionApp(Site functionApp, GitIgnoreParser ignoreParser, IDictionary`2 additionalAppSettings) in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\AzureActions\PublishFunctionAppAction.cs:line 504
   at Azure.Functions.Cli.Actions.AzureActions.PublishFunctionAppAction.RunAsync() in D:\a\_work\1\s\src\Azure.Functions.Cli\Actions\AzureActions\PublishFunctionAppAction.cs:line 191
   at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\_work\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 64

Version in csproj file:

TargetFrameworknetcoreapp 3.1

AzureFunctionsVersion v3

VeikkaGus
  • 1
  • 1

1 Answers1

0

Please check if the below steps help to fix the issue:

  1. As you didn't mention the version of System.IdentityModel.Tokens.Jwt package, many workarounds saying that there are issues in some versions. Please check by downgrading or upgrading that package.
  2. Try using this package Microsoft.AspNetCore.Authentication.JwtBearer instead of the package System.IdentityModel.Tokens.Jwt.