Skip to main content

Search

Search

Seagull.bartender.print Not Loaded

Comments

10 comments

  • Avatar
    Canguita

    Hello Randy,

     

    Thank you very much for your post.

     

    1. Are you using Visual Studio? If yes, can you let me know which version?

     

    2. Please let us know your Windows version.

     

    3. Can you provide us with your build number? You can check it clicking on Bartender "Help" menu > "About" item

     

    4. How have you added the refference exactly?

     

    5. Can you copy and past the part of code that is calling the "Seagull.BarTender.Print" method?

     

    Thanks,

     

    Carlos

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    Make sure to update to BT v10.1 SR2:

    http://www.bartenderbarcodesoftware.com/label-software/fixes_101.aspx

     

    Can you include the relevant part of your source code for us to examine?

     

    Furthermore, can you run and work correctly with some of our .NET SDK samples? They can be found in Windows under "Start > All Programs > BarTender v10.1 > BarTender .NET SDKs"

    0
  • Avatar
    Legacy Poster

    Hey Carlos,

     

    Thanks for replying. Here is the information you are requesting

     

    1. Visual Studio 2010 version 10.0.40219.1 SP1Rel

     

    2 & 3.

    Edition:

    Enterprise Automation (200 Printers)

    Version:

    10.1 SR1

    Build:

    2934

    OS:

    Windows 7 Enterprise [x64], SP1

     

    4. Under My Project - References Tab - Add - Browse (or Net) - C:\Program Files (x86)\Seagull\BarTender Suite\SDK\Assemblies\Seagull.BarTender.Print.dll

    This also shows as version 10.1.1.1

     

    5.

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim x As Int32

    Using btEngine As New Engine()

     

    'Start The Bartender Application

    btEngine.Start()

     

    'Hide the window

    btEngine.Window.Visible = False

     

    ' Open a label format.

    Dim btFormat As LabelFormatDocument

    '  Choose which btw format

    If Me.LabelStyleCheck.Checked = True Then

            btFormat = btEngine.Documents.Open("\\preston\DC_Production_Apps\Testing\LabelGen2.BTW")

    Else

            btFormat = btEngine.Documents.Open("\\preston\DC_Production_Apps\Testing\LabelGen.BTW")

    End If

    'Dim btFormat As LabelFormatDocument = btEngine.Documents.Open("C:\MyLabel.btw")

     

    ' Change the number of identical labels and serialized labels to print

    'btFormat.PrintSetup.NumberOfSerializedLabels = 4

    'btFormat.PrintSetup.IdenticalCopiesOfLabel = 10

    ' Change the Printer to what was selected

     

    btFormat.PrintSetup.PrinterName = Me.ComboBox1.Text

     

    btFormat.SubStrings("Location").Value = ""

    btFormat.SubStrings("Style").Value = ""

    btFormat.SubStrings("Color").Value = ""

    btFormat.SubStrings("Size").Value = ""

    btFormat.SubStrings("SKU").Value = ""

    btFormat.SubStrings("DoNotTrash").Value = ""

    'Change Values of information on Label

    Do Until x = Me.LabelInfo.Locations.Rows.Count

           If Me.LabelStyleCheck.Checked = True Then

                     btFormat.SubStrings("Style").Value = Me.LabelInfo.Locations.Rows.Item(x).Item(4)

                     btFormat.SubStrings("SKU").Value = Me.LabelInfo.Locations.Rows.Item(x).Item(4)

           Else

                     btFormat.SubStrings("Location").Value = Me.LabelInfo.Locations.Rows.Item(x).Item(4)

        End If

     

        ' Print the label

            Dim result As Result = btFormat.Print()

            x = x + 1

    Loop

     

    btFormat.SubStrings("Location").Value = ""

    btFormat.SubStrings("Style").Value = ""

    btFormat.SubStrings("SKU").Value = ""

    btFormat.Close(Seagull.BarTender.Print.SaveOptions.DoNotSaveChanges)

     

    End Using

     

    'Dim DataTable As New DataTable

    'DataTable.Load(LabelInfo.Locations.CreateDataReader)

    'Labels.Main(DataTable)

     

    Me.LabelInfo.Locations.Clear()

     

    Me.Label3.Text = Me.LabelInfo.Locations.Rows.Count

     

    End Sub

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    You should be adding the reference to this DLL from the Windows GAC instead: "C:\Windows\assembly", so you would probably wish to remove and re-add the reference to the assembly in question.

     

    If the problem persists, please update to 10.1 SR2 and let us know if it solves the problem.

    0
  • Avatar
    Legacy Poster

    Thanks Domingo,

     

    Referencing the Windows GAC resolved that problem but now there is a new one.

     

    Here is what I am getting on the BTEngine.Start()

     

    System.IO.FileLoadException was unhandled
      Message=Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
      Source=Seagull.BarTender.Print
     

    Do you have a suggestion on this?

     

    Thanks again for all your help.

    Randy

    0
  • Avatar
    Domingo Rodriguez
    Moderator
  • Avatar
    Ian Cummings
    Moderator

    Check out BarTender 2016, now supporting x64 and .NET framework 4.0: http://www.seagullscientific.com/downloads/label-software/barcode-label-printing-software-download/

    0
  • Avatar
    Sebastien Frade

    Hi,

     

    I have Visual Studio Community 2017 and Bartender installed and activated on my Windows 7 64bits PC.

    I can only find the reference to the Seagul assembly in the installation folder of Bartender: C:\Program Files\Seagull\BarTender Suite\SDK\Assemblies\Seagull.BarTender.Print.dll

    And the compilation failed: System.BadImageFormatException: 'Could not load file or assembly 'Seagull.BarTender.Print, Version=11.0.7.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' or one of its dependencies. An attempt was made to load a program with an incorrect format.'

    Here is the code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Seagull.BarTender.Print;
    namespace ConsoleApp1
    {
        class Program
        {
            static void Main(string[] args)
            {
                var btEngine = new Engine();
            }
        }
    }

     

    --EDIT--

    I just changed the target platform to x86 and it works.

    Any advice to make it works on 64 bits platform?

    Cheers,
    Seb

     

     

    0
  • Avatar
    Ian Cummings
    Moderator

    Sfrade: What BarTender 2016 software do you have installed?  What is the release number (Rn) and is it the x86 or x64 variation?

    0
  • Avatar
    Jasbir Antil

    HI,

    I am getting below error:

    Configuration Error

    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: Could not load file or assembly 'Seagull.BarTender.Print, Version=11.1.4.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Source Error:

    Line 31:       <assemblies>
    Line 32:         <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    Line 33:         <add assembly="Seagull.BarTender.Print, Version=11.1.4.1, Culture=neutral, PublicKeyToken=109FF779A1B4CBC7"/>
    Line 34:         <add assembly="Seagull.Services.PrintScheduler, Version=11.1.4.1, Culture=neutral, PublicKeyToken=109FF779A1B4CBC7"/>
    Line 35:       </assemblies>


    Source File: C:\inetpub\wwwroot\RFID\web.config    Line: 33

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'Seagull.BarTender.Print, Version=11.1.4.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' could not be loaded.

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    

     


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.3928.0

     

    Can anyone help me on this???

    Thanks,

    Sagar Shinde

    0

Please sign in to leave a comment.