NET 6 GetProvisioningTemplate - Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=6.27.0.0'
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
Hi
I have an Azure Function with .NET 6.
I'm using the PnP.Framework to copy the site template between sites.
This is the simple snippet of code i'm using to retrieve the template:
using (var ctx = new AuthenticationManager().GetACSAppOnlyContext(TemplateUrl,
config["client_id"],
config["client_secret"]))
{
var template = ctx.Web.GetProvisioningTemplate();
}
I can see in the output logs that the library is evaluating various elements of the site, as security, group etc. Then when arrives at "List Istances" i got the following error:
Could not load file or assembly 'System.IdentityModel.Tokens.Jwt, Version=6.27.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
I've tried to import this library at the exact version but it doesn't solve the problem.
The version of the PnP.Framework is the 1.12.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Azure Function's project dependencies and the entry point ctx.Web.GetProvisioningTemplate() using PnP.Framework 1.12.0 on .NET 6. Reproduce the failure while processing "List Instances" and trace the assembly resolution for System.IdentityModel.Tokens.Jwt; done means the template is retrieved without the reported load error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100