Search Results for

    Show / Hide Table of Contents

    Getting Started

    This tutorial if for dotnetcore users. If you are trying to create a .NET Framework project, skip to the end of this page.

    1. Install .NET Core SDK for your operating system
    2. Open your favorite terminal
    3. Setup Project and install library
    dotnet new console -o reliance_sample 
    cd reliance_sample
    dotnet add package PTIRelianceLib
    
    1. Open Program.cs in your favorite editor and replace the code with the following:
    using System;
    using PTIRelianceLib;
    
    namespace reliance_sample
    {
        class Program
        {
            static void Main(string[] args)
            {
                using(var printer = new ReliancePrinter())
                {
                    var rev = printer.GetFirmwareRevision();
                    Console.WriteLine("Firmware revision: {0}", rev);
                }
            }
        }
    }
    
    Important

    Linux users, please make sure libusb is installed before proceeding

    1. Execute
    dotnet run
    

    Results

    Output

    .NET Framework 4.6.1+ or other netstandard2.0 Framework

    We recommend first creating a console application to get a feel for the library. Once this works, you can then create a GUI application (WPF, WinForms, etc.). This example assumes the latest version of Visual Studio is being used.

    1. Ensure you have a compatible framework installed

    2. Create a new C# desktop project, select Console

    3. In the project settings, make sure .NET Framework 4.6.1+ is selected

    4. Click create project

    5. Once project is generated, add this library to your application

      Install-Package PTIRelianceLib

    6. Copy the sample code from above into your application

    7. Build, run, and done!

    • Improve this Doc
    In This Article
    Back to top Copyright © 2018 Pyramid Technologies
    Generated by DocFX