Closed Coradis closed 2 years ago
Am I correctly assuming that you are managing dependencies with the NuGet package manager?
I'm surprised to see that SkiaSharp version 2.80.0 is used instead of the latest version 2.80.3. Are you using this library yourself, or do you have another NuGet package that depends on it?
Can you try to upgrade it to version 2.80.3?
Hi Manuel, thx for your answer, yes I use the Nuget package manager, I just updated Codecrete.SwissQRBill.Generator 2.5.3 to 3.0.1 by the Nuget Manager and automatically SkiaSharp is added, with the correct version 2.8.3, hereafter the code in the csproj :
< Reference Include="SkiaSharp, Version=2.80.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
< /Reference >
Maybe it's only related to my environment (?) I found this in my resarch :
https://github.com/mono/SkiaSharp/issues/1767
It doesn't really help me at the moment, I keep looking.
Best regards, Herve
The linked SkiaSharp bug could indeed be the problem. Unfortunately, it hasn't been resolved it.
It also indicates that your project relies on strong-named assemblies.
I will investigate what I can do so that the latest QR Bill library can be used with earlier SkiaSharp libraries. They should be sufficient.
Can you provide more information about your project as I'm still unable to reproduce it (even though the invalid strong-naming of SkiaSharp certainly is a problem).
Hi,
I am not familiar with the concept of strong-named assemblies, Is this related to the fact that we sign our ClickOnce manifests?
From VS (2017 version) in debug mode.
The only one that comes to mind is Telerik (UI for WPF)
Best regards Herve
I've already tried this setting and unfortunately it's not sufficient to reproduce the problem.
Would it be possible that you share the project file (just the .csproj, .targets, .proj or whatever you use, without the source code except for AssemblyInfo.cs and app.manifest if used)?
I think I have a solution but haven't been able to verify it.
I will send you the source code in my next message, hereafter the steps to update to 3.0.1 :
Full (small) project extract "as is" from the VS solution : (I assumed that you want the code with the problem)
Thanks a lot for the project files. This has helped me reproduce it and test the fix. It's a Word add-in (and not a regular application)!
You now have two options:
Upgrade to version 3.0.2 of Codecrete.SwissQRBill.Generator and then selectively downgrade SkiaSharp to version 2.80.2
Use the code from Microsoft Word Add-in example and in particular the code in the main add-in class plus the two classes SystemDrawingCanvas and MetafileCanvas. For this option, use the Codecrete.SwissQRBill.Core NuGet package (instead of Codecrete.SwissQRBill.Generator).
The advantage of option 2 is that it uses the EMF format (instead of PNG), which is resolution-independent and therefore of higher quality. Additionally, it does not require SkiaSharp and is thus smaller and quicker.
Thank you very much for your time and speed in finding a solution. We chose the 2nd option and it does the job very well.
Do you think that the 2 classes SystemDrawingCanvas and MetafileCanvas could be included in the standard package ? or should they always be used outside? (just for information for us, we can handle them very well like that). Thanks again, we close this issue.
Best regards, Herve.
Thanks for the feedback. Glad to hear it has helped you.
I'm considering making it part of a NuGet package, but I haven't decided it yet. It's a Windows-only technology, so it would need to be in a separate package.
A new NuGet package Codecrete.SwissQRBill.Windows has been published. It includes the SystemDrawingCanvas
and MetafileCanvas
classes. Note that they are in different namespace (Codecrete.SwissQRBill.Windows
instead of Codecrete.SwissQRBill.SystemDrawing
).
Thanks for information.
Hi,
I've a working .net 4.62 project that generates QR bill with Codecrete.SwissQRBill.Generator 2.5.3 version.
I've tryed to update to 3.0.1 version and I got this exception :
Impossible de charger le fichier ou l'assembly 'SkiaSharp, Version=2.80.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' ou une de ses dépendances. Impossible de vérifier la signature de nom fort. L'assembly a pu être falsifié ou il est à signature différée, mais pas totalement signé avec la clé privée correcte. (Exception de HRESULT : 0x80131045)
The code is ; " using (PNGCanvas canvas = new PNGCanvas(QRBill.QrBillWidth, QRBill.QrBillHeight, 300, "Helvetica, Arial, Sans")) { ..... } " I rollback to 2.5.3 and it work fine
Thank's a lot for help Best regards, Herve