i am getting an error when I tried to create a QR code in Azure using Durable Functions.
“The type initializer for ‘Aspose.BarCode.Generation.BarcodeGenerator’ threw an exception.”
" at Aspose.BarCode.Generation.BarcodeGenerator…ctor(BaseEncodeType type, String codeText)\r\n at DurFunctionBarCodeTest.Function1.Run(TimerInfo myTimer, ILogger log) in C:\_mydata\_projects 2020\SGE_AZURE_POC\2021-05-26\Dev_Azure_Poc2\DurFunctionBarCodeTest\Function1.cs:line 19"
@tony.woods.bell.ca,
We have reviewed your issue and logged it into our database for a detailed analysis. You will be notified here once any update is ready for sharing.
This issue is logged as: BARCODENET-37913 - Aspose BarCode not working in Azure Durable Functions
When building an Azure Functions project, the build tools optimize the output so that only one copy of any assemblies that are shared with the functions runtime are preserved. It also ‘optimizes’ System.Text.Encoding.CodePages that is need for Aspose.Barcode library.
Solution is to preserve System.Text.Encoding.CodePages by adding this to your csproj:
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.