Getting Error While printing the barcode in offline mode of Commerce POS #371
Unanswered
Pankaj-0723
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
Hope all are doing well !!!
We have an issue with the barcode printing in offline mode of POS. We are printing a custom receipt where we print the barcode using an external dll Zxing.dll. It is working fine in online mode but in offline mode it is giving error.
Error:
An exception occurred while executing request. CorrelationId: 'ec297f77-e6e9-4187-aaef-a9acdd40956c'. Ex: 'System.IO.FileLoadException: Could not load file or assembly 'zxing, Version=0.16.9.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60'. Could not find or load a specific file. (0x80131621)
File name: 'zxing, Version=0.16.9.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60'
---> System.IO.FileLoadException: Could not load file or assembly 'zxing, Version=0.16.9.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60'.
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Microsoft.Dynamics.Commerce.Runtime.Extensibility.Configuration.DirectoryAssemblyResolver.ResolveAssembly(Object sender, ResolveEventArgs args)
at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
at Ahlens.Commerce.Runtime.DataServices.Extensions.GetCustomReceiptFieldsService.GetBarCode(GetSalesTransactionCustomReceiptFieldServiceRequest request, String text)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Ahlens.Commerce.Runtime.DataServices.Extensions.GetCustomReceiptFieldsService.GetBarCode(GetSalesTransactionCustomReceiptFieldServiceRequest request, String text)
at Ahlens.Commerce.Runtime.DataServices.Extensions.GetCustomReceiptFieldsService.GetCustomReceiptFieldForSalesTransactionReceiptsAsync(GetSalesTransactionCustomReceiptFieldServiceRequest request)
at Ahlens.Commerce.Runtime.DataServices.Extensions.GetCustomReceiptFieldsService.Execute(Request request)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.ExecuteCore[TResponse](Request request, RequestContext context, IReadOnlyCollection`1 handlersToInvoke, Boolean skipRequestTriggers, Boolean isAsyncExecution)'. ExceptionType: 'System.IO.FileLoadException'. ErrorResourceId: ''. HandlerTypeName: 'Ahlens.Commerce.Runtime.DataServices.Extensions.GetCustomReceiptFieldsService'. RequestTypeName: 'Microsoft.Dynamics.Commerce.Runtime.Services.Messages.GetSalesTransactionCustomReceiptFieldServiceRequest'. HandlerAssemblyName: 'Ahlens.Commerce.Runtime.DataServices'. HandlerAssemblyPublicKeyToken: ''. UnscrubbedException: '(null)'.
To mitigate this issue, we thought we can use the EncodeBarcodeServiceRequest then we do not require this Zxing.dll file.
Unfortunately I found that this is available in the "Microsoft.Dynamics.Commerce.Runtime.ElectronicReporting" namespace which I can not find in the nuget package of D365 commerce. Could you please let us know how we can use this?
Or Could you please let us know how to resolve the above error?
Beta Was this translation helpful? Give feedback.
All reactions