BBGMetalmeccanica BBG
BBGMetalmeccanica BBG

Reputation: 23

Problem with printing a DYMO label SkiaSharp.Views.Desktop Error

Good morning I have a problem with printing a DYMO label. I tried to print with the example tutorial on the DYMO Blog but it always gives me this error:

$exception {"Could not load file or assembly 'SkiaSharp.Views.Desktop, Version=1.68.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The specified assembly manifest definition does not match the assembly reference. ( Exception from HRESULT: 0x80131040)":"SkiaSharp.Views.Desktop, Version=1.68.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"} System.IO.FileLoadException

I have Visual Studio community 2022 with .NET framework 4.8. Please can someone help me? A thousand thanks

I also add the module in VB.NET which exactly matches the tutorial.

Imports DymoSDK.Implementations
Imports System.IO.Path
Imports DymoSDK
Imports OpenTK
Module Module1

    Sub Main()
        DymoSDK.App.Init()

        Dim fullpath As String = System.IO.Path.GetFullPath("C:\Users\fabri\source\repos\VB_DYMOSDK_Sample\VB_DYMOSDK_Sample\ProvaEtichetta.dymo")
        Dim dymoSDKLabel = DymoLabel.Instance
        dymoSDKLabel.LoadLabelFromFilePath(fullpath)

        Dim dymoSDKPrinter = DymoPrinter.Instance

        Dim Printers = DymoPrinter.Instance.GetPrinters()
        Dim ConnectedPrinter = Printers.FirstOrDefault()

        For Each prt In Printers    ' Iterate through each element and find a connected printer.  
            Console.WriteLine($"Printer info: {prt.DriverName}, {prt.Name}, {prt.IsTwinTurbo}")
            If prt.IsConnected Then
                ConnectedPrinter = prt
            End If
        Next

        If dymoSDKPrinter.PrintLabel(dymoSDKLabel, ConnectedPrinter.Name, 1, False, False, 0, False, False) Then
            Console.WriteLine("Print successful.")
        End If

        Console.ReadKey()

    End Sub

End Module

Upvotes: 1

Views: 273

Answers (1)

Robert Zantarra
Robert Zantarra

Reputation: 11

I've been working with wpf C# on dymo Connect and has been nothing but headaches.

Did you use the Nuget for ConnectSDK? If so, check on the version of the dependences. SkiaSharp is required, along with dependencies for that as well.

https://www.nuget.org/packages/DYMO.Connect.SDK/

That will give you the dependencies.

capture of depenandices for Dymo.Connect.SDK

Upvotes: 0

Related Questions