ASP.NET Core 2.0 Hosting: How to Generate QR Code Generator In ASP.NET Core Using ZXING.NET

In this tutorial, I will explain how to create a QR Code Generator in ASP.NET Core 1.0, using Zxing.Net.  I tried to create a QR Code Generator in ASP.NET Core, using third party libraries but in most of the cases codes are not fully supported in ASP.NET Core because of some version issues etc. I searched a lot in Google but finally I found “Zxing.Net” and it is a library, which supports decoding and generating of the barcodes. I had a discussion with MicJahn and came up  with a great solution.
hflnet51
Zxing.Net
A library, which supports decoding and generating of the barcodes (Example: QR Code, PDF 417, EAN, UPC, Aztec, Data Matrix, Codabar) within the images.

Assemblies required
The assemblies given below are required for QR Code Generator.

Packages required
We need the packages given below for drawing and creating QR Code Generator.
“CoreCompat.System.Drawing”: “1.0.0-beta006″,
“ZXing.Net”: “0.15.0”

C#
QRCodeTagHelper class given below contains QR Code Generator methods etc.

Index.chtml
The code given below will display QR Code Generator.

A library which supports decoding and generating of barcodes (like QR Code, PDF 417, EAN, UPC, Aztec, Data Matrix, Codabar) within images.
<qrcode alt=”QR Code” content=”http://www.aspnethostingnews.com” />

http://www.aspnethostingnews.com

_ViewImports.cshtml

The code Injecting TagHelper given below is in the entire Application.

@addTagHelper “*, QRCodeApp”

project.json
The dependencies given below are required to create QR Code Application.