Azure Functions: [A]PnPManifest cannot be cast to [B]PnPManifest
See original GitHub issueI load my PnP Template from a .pnp file, and this works without a problem when executing locally. If I deploy my Azure Function, I get the following error:
[Error] Error Message: [A]PnP.Framework.Provisioning.Connectors.OpenXML.Model.PnPManifest cannot be cast to [B]PnP.Framework.Provisioning.Connectors.OpenXML.Model.PnPManifest. Type A originates from 'PnP.Framework, Version=0.1.109.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\home\site\wwwroot\bin\PnP.Framework.dll'. Type B originates from 'PnP.Framework, Version=0.1.109.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\home\site\wwwroot\bin\PnP.Framework.dll'.
[Error] Error while processing dossier: [A]PnP.Framework.Provisioning.Connectors.OpenXML.Model.PnPManifest cannot be cast to [B]PnP.Framework.Provisioning.Connectors.OpenXML.Model.PnPManifest. Type A originates from 'PnP.Framework, Version=0.1.109.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\home\site\wwwroot\bin\PnP.Framework.dll'. Type B originates from 'PnP.Framework, Version=0.1.109.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\home\site\wwwroot\bin\PnP.Framework.dll'.
at PnP.Framework.Provisioning.Connectors.OpenXML.PnPPackage.GetXamlSerializedPackagePartValue[T](PackagePart part)
at PnP.Framework.Provisioning.Connectors.OpenXML.PnPPackage.get_Manifest()
at PnP.Framework.Provisioning.Connectors.OpenXML.PnPPackageExtensions.LoadPnPPackage(PnPPackage package)
at PnP.Framework.Provisioning.Connectors.OpenXML.PnPPackageExtensions.UnpackTemplate(MemoryStream stream)
at PnP.Framework.Provisioning.Connectors.OpenXMLConnector..ctor(String packageFileName, FileConnectorBase persistenceConnector, String author, X509Certificate2 signingCertificate, String templateFileName)
at ...
If I switch my code to run from .xml, it works in Azure Functions. Problem seems to happen in this method, but I don’t see why. There are two casts happening… https://github.com/pnp/pnpframework/blob/6b7b45166cf4fd17412fe3dff9ef14a6a1def35d/src/lib/PnP.Framework/Provisioning/Connectors/OpenXML/PnPPackage.cs#L315-L350
Issue Analytics
- State:
- Created 3 years ago
- Comments:27 (23 by maintainers)
Top Results From Across the Web
Understanding the Azure Active Directory app manifest
The application manifest contains a definition of all the attributes of an application object in the Microsoft identity platform.
Read more >Not able to access the manifest - Microsoft Q&A
So, I go to the configuration page and then to the Manage option under Microsoft App Id, further selecting the Manifest option from...
Read more >Troubleshoot error: Azure Functions Runtime is unreachable
This issue occurs when the Functions runtime can't start. The most common reason for this is that the function app has lost access...
Read more >Cannot update KeyCredential 'Value' in Azure application ...
It will let me upload a manifest with the Value set, but then it wipes it out and resets it back to null....
Read more >Spring Cloud Function 2.0 and Azure Functions
I'm having issues resolving the Main Class in my Azure Function: Failed to discover main class. An attempt was made to discover main...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@YannickRe : been way too busy…so did not have time for this. Feel free to keep bumping it
Hi, you might try to change your csproj of the Azure Function and add this Line “<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>”
in here like this:
This usually helps to resolve conflicts with classes which the Azure Function Framework uses as well.