Barcode Xpress for .NET Core v13.4 - Updated
Build and Run the Sample
User Guide > How To > Build and Run the Sample

This sample was designed to be run from the command line. We have included options to search for a specific barcode type, list all supported barcode types, and print how to use this sample. The only requirement is that you specify a path to the image you want to scan for barcodes.

Command Line Interface (CLI)

To run the sample using the .Net CLI, use the "dotnet run" command and specify an image path. This will build and run the sample.

Run the sample
Copy Code
dotnet run path/to/your/image.jpg
Scan for a specific barcode type
Copy Code
dotnet run -t QRCode path/to/your/image.bmp
Scan for more than one barcode type
Copy Code
dotnet run -t QRCode -t Aztec path/to/your/image.png
List all the barcode types
Copy Code
dotnet run -l
Print usage
Copy Code
dotnet run -u

Visual Studio

To run the sample using Visual Studio:

  1. Open the solution, right-click on the ReadBarcodes project in the Solution Explorer, select Properties, and then click on the Debug tab.
  2. In the Application arguments text box:
    • Specify an image path (required)
    • Enter values for all the optional arguments, as required
  3. After you have specified an image path and any additional arguments, press CTRL+F5 to run the sample.

Example Application Arguments

The following are examples showing how to use the Application arguments for this sample.

Run the sample
Copy Code
path/to/your/image.jpg
Scan for a specific barcode type
Copy Code
-t QRCode path/to/your/image.bmp
Scan for more than one barcode type
Copy Code
-t QRCode -t Aztec path/to/your/image.png
List all the barcode types
Copy Code
-l
Print usage
Copy Code
-u