Skip to footer content
MIGRATION GUIDES

Migrating from MessagingToolkit.Barcode to IronBarcode

MessagingToolkit.Barcode published its final release — version 1.7.0.2 — in 2013 and has received no updates since. This guide covers the complete migration path to IronBarcode: why the migration is necessary, what changes in the code, and how to verify the migration is complete. The guide addresses both teams migrating barcode functionality in isolation and teams undertaking a broader .NET framework upgrade for which MessagingToolkit.Barcode is a blocking dependency.

Why Migrate from MessagingToolkit.Barcode

Framework Compatibility Blocker: MessagingToolkit.Barcode targets .NET Framework 3.5, 4.0, and 4.5. It has no .NET Standard target and no .NET Core target. When any project file that references this package is set to a modern .NET target framework — .NET 6, .NET 7, .NET 8, or .NET 9 — the NuGet restore operation fails with a framework compatibility error. The build does not proceed. This is not a warning or a runtime degradation; it is a compile-time failure that prevents the project from building at all. Removing MessagingToolkit.Barcode is a prerequisite for any .NET framework upgrade, not an optional cleanup step.

Security Exposure: Twelve years have elapsed since the last code change. Any vulnerability discovered after 2014 in the library's image parsing logic, its ZXing-derived decode implementation, or its transitive dependencies has no patch, no advisory, and no maintainer to contact. Security scanning tools flag the package as abandoned. Compliance frameworks — PCI DSS, HIPAA, SOC 2, ISO 27001 — require active patch management of third-party software. An abandoned package fails these audits on process grounds regardless of whether a specific CVE has been identified.

Discontinued Platform Targets: The NuGet package metadata lists Silverlight 3, 4, and 5 as target platforms; all three were discontinued in 2021. Windows Phone 7.0, 7.5, 7.8, and 8.0 are listed; end of support for these platforms occurred between 2014 and 2017. The library was never updated to target any platform that succeeded these discontinued environments.

Capability Gaps: MessagingToolkit.Barcode accepted only System.Drawing.Bitmap inputs, which is Windows-only in .NET 6 and later. It returned a single result per decode call, with no support for multi-barcode images. It had no PDF reading capability — applications that needed to read barcodes from PDF documents required a separate extraction step before calling the library. Output generation returned a Bitmap, requiring a System.Drawing.Imaging import and preventing cross-platform deployment.

The Fundamental Problem

MessagingToolkit.Barcode forces a dependency on System.Drawing and an instance-based workflow that is incompatible with modern .NET:

// MessagingToolkit.Barcode: only compiles on .NET Framework 4.5 or earlier
// System.Drawing.Bitmap throws PlatformNotSupportedException on Linux/.NET 6+
using MessagingToolkit.Barcode;
using System.Drawing;

var decoder = new BarcodeDecoder();
using (var bitmap = new Bitmap("barcode.png"))  // Windows-only in .NET 6+
{
    var result = decoder.Decode(bitmap);          // Single result or null
    if (result != null)
    {
        Console.WriteLine(result.Text);
    }
}
// MessagingToolkit.Barcode: only compiles on .NET Framework 4.5 or earlier
// System.Drawing.Bitmap throws PlatformNotSupportedException on Linux/.NET 6+
using MessagingToolkit.Barcode;
using System.Drawing;

var decoder = new BarcodeDecoder();
using (var bitmap = new Bitmap("barcode.png"))  // Windows-only in .NET 6+
{
    var result = decoder.Decode(bitmap);          // Single result or null
    if (result != null)
    {
        Console.WriteLine(result.Text);
    }
}
Imports MessagingToolkit.Barcode
Imports System.Drawing

Dim decoder As New BarcodeDecoder()
Using bitmap As New Bitmap("barcode.png") ' Windows-only in .NET 6+
    Dim result = decoder.Decode(bitmap) ' Single result or Nothing
    If result IsNot Nothing Then
        Console.WriteLine(result.Text)
    End If
End Using
$vbLabelText   $csharpLabel

IronBarcode removes the System.Drawing dependency entirely and works identically on Windows, Linux, macOS, and Docker containers:

// IronBarcode: runs on .NET 6, 7, 8, 9 — Windows, Linux, macOS, Docker
using IronBarCode;

IronBarCode.License.LicenseKey = "YOUR-KEY";

var results = BarcodeReader.Read("barcode.png");  // No Bitmap, no System.Drawing
foreach (var result in results)
{
    Console.WriteLine(result.Value);
}
// IronBarcode: runs on .NET 6, 7, 8, 9 — Windows, Linux, macOS, Docker
using IronBarCode;

IronBarCode.License.LicenseKey = "YOUR-KEY";

var results = BarcodeReader.Read("barcode.png");  // No Bitmap, no System.Drawing
foreach (var result in results)
{
    Console.WriteLine(result.Value);
}
Imports IronBarCode

IronBarCode.License.LicenseKey = "YOUR-KEY"

Dim results = BarcodeReader.Read("barcode.png")  ' No Bitmap, no System.Drawing
For Each result In results
    Console.WriteLine(result.Value)
Next
$vbLabelText   $csharpLabel

IronBarcode vs MessagingToolkit.Barcode: Feature Comparison

Feature MessagingToolkit.Barcode IronBarcode
Last updated 2014 2026 (active)
NuGet version 1.7.0.2 (final) Current, regularly updated
.NET 6 / 7 / 8 / 9 support No Yes
.NET Framework 4.6.2+ No Yes
.NET Framework 3.5–4.5 Yes No
.NET Core support No Yes
ASP.NET Core No Yes
.NET MAUI No Yes
Blazor No Yes
Cross-platform (Linux, macOS) No Yes
Docker / container support No Yes
Barcode reading input types Bitmap only Path, stream, byte array, PDF
PDF barcode reading No Yes (native)
Multi-barcode per image No Yes
Automatic format detection No Yes
Barcode generation output formats Bitmap only PNG, JPEG, SVG, PDF, byte array
System.Drawing dependency Required None
Security patches None since 2014 Regular patches
Commercial support None Professional support available
Compliance audit result Flagged as abandoned Passes standard audits

Quick Start: MessagingToolkit.Barcode to IronBarcode Migration

Step 1: Replace NuGet Package

Remove the MessagingToolkit.Barcode package:

dotnet remove package MessagingToolkit.Barcode
dotnet remove package MessagingToolkit.Barcode
SHELL

If the project references MessagingToolkit.Barcode.dll directly through a <HintPath> entry in the .csproj file, remove that reference as well.

Install IronBarcode:

dotnet add package IronBarcode
dotnet add package IronBarcode
SHELL

IronBarcode supports .NET Framework 4.6.2 through .NET 9. It installs as a single package with all dependencies bundled — no separate graphics library or ZXing reference is required alongside it.

Step 2: Update Namespaces

Replace the MessagingToolkit namespace with the IronBarcode namespace in every file that references the old library:

// Remove this
using MessagingToolkit.Barcode;
using System.Drawing;  // if used only for Bitmap input to MessagingToolkit

// Add this
using IronBarCode;
// Remove this
using MessagingToolkit.Barcode;
using System.Drawing;  // if used only for Bitmap input to MessagingToolkit

// Add this
using IronBarCode;
Imports IronBarCode
$vbLabelText   $csharpLabel

Files that imported System.Drawing solely for the Bitmap type used with MessagingToolkit.Barcode may have that import removed once IronBarcode is in place.

Step 3: Initialize License

Add license initialization once at application startup — in Program.cs, Startup.cs, or the equivalent entry point. A license key is required for production use; the library operates in trial mode without one.

// Add once at application startup
IronBarCode.License.LicenseKey = "YOUR-IRONBARCODE-KEY";
// Add once at application startup
IronBarCode.License.LicenseKey = "YOUR-IRONBARCODE-KEY";
' Add once at application startup
IronBarCode.License.LicenseKey = "YOUR-IRONBARCODE-KEY"
$vbLabelText   $csharpLabel

Code Migration Examples

Reading Barcodes from Image Files

The old approach required constructing a Bitmap from the file path and passing it to a BarcodeDecoder instance. IronBarcode accepts the file path directly.

MessagingToolkit.Barcode Approach:

using MessagingToolkit.Barcode;
using System.Drawing;

public string ReadBarcodeValue(string imagePath)
{
    var decoder = new BarcodeDecoder();
    using (var bitmap = new Bitmap(imagePath))
    {
        var result = decoder.Decode(bitmap);
        return result?.Text;
    }
}
using MessagingToolkit.Barcode;
using System.Drawing;

public string ReadBarcodeValue(string imagePath)
{
    var decoder = new BarcodeDecoder();
    using (var bitmap = new Bitmap(imagePath))
    {
        var result = decoder.Decode(bitmap);
        return result?.Text;
    }
}
Imports MessagingToolkit.Barcode
Imports System.Drawing

Public Function ReadBarcodeValue(imagePath As String) As String
    Dim decoder As New BarcodeDecoder()
    Using bitmap As New Bitmap(imagePath)
        Dim result = decoder.Decode(bitmap)
        Return If(result IsNot Nothing, result.Text, Nothing)
    End Using
End Function
$vbLabelText   $csharpLabel

IronBarcode Approach:

using IronBarCode;

public string ReadBarcodeValue(string imagePath)
{
    var results = BarcodeReader.Read(imagePath);
    return results.FirstOrDefault()?.Value;
}
using IronBarCode;

public string ReadBarcodeValue(string imagePath)
{
    var results = BarcodeReader.Read(imagePath);
    return results.FirstOrDefault()?.Value;
}
Imports IronBarCode

Public Function ReadBarcodeValue(imagePath As String) As String
    Dim results = BarcodeReader.Read(imagePath)
    Return results.FirstOrDefault()?.Value
End Function
$vbLabelText   $csharpLabel

The IronBarcode version removes the Bitmap construction and the null-conditional pattern on a single object. BarcodeReader.Read() returns a collection — an empty collection when nothing is found — so .FirstOrDefault() replaces the null check on the old single-result return value.

Accessing Format Information from Results

MessagingToolkit.Barcode exposed the detected format through result.BarcodeFormat. IronBarcode exposes it through result.BarcodeType. Both are enum values on the result object, with different enum type names.

MessagingToolkit.Barcode Approach:

using MessagingToolkit.Barcode;
using System.Drawing;

var decoder = new BarcodeDecoder();
using (var bitmap = new Bitmap("barcode.png"))
{
    var result = decoder.Decode(bitmap);
    if (result != null)
    {
        Console.WriteLine($"Value: {result.Text}");
        Console.WriteLine($"Format: {result.BarcodeFormat}");
    }
}
using MessagingToolkit.Barcode;
using System.Drawing;

var decoder = new BarcodeDecoder();
using (var bitmap = new Bitmap("barcode.png"))
{
    var result = decoder.Decode(bitmap);
    if (result != null)
    {
        Console.WriteLine($"Value: {result.Text}");
        Console.WriteLine($"Format: {result.BarcodeFormat}");
    }
}
Imports MessagingToolkit.Barcode
Imports System.Drawing

Dim decoder As New BarcodeDecoder()
Using bitmap As New Bitmap("barcode.png")
    Dim result = decoder.Decode(bitmap)
    If result IsNot Nothing Then
        Console.WriteLine($"Value: {result.Text}")
        Console.WriteLine($"Format: {result.BarcodeFormat}")
    End If
End Using
$vbLabelText   $csharpLabel

IronBarcode Approach:

using IronBarCode;

var results = BarcodeReader.Read("barcode.png");
var first = results.FirstOrDefault();
if (first != null)
{
    Console.WriteLine($"Value: {first.Value}");
    Console.WriteLine($"Format: {first.BarcodeType}");
}
using IronBarCode;

var results = BarcodeReader.Read("barcode.png");
var first = results.FirstOrDefault();
if (first != null)
{
    Console.WriteLine($"Value: {first.Value}");
    Console.WriteLine($"Format: {first.BarcodeType}");
}
Imports IronBarCode

Dim results = BarcodeReader.Read("barcode.png")
Dim first = results.FirstOrDefault()
If first IsNot Nothing Then
    Console.WriteLine($"Value: {first.Value}")
    Console.WriteLine($"Format: {first.BarcodeType}")
End If
$vbLabelText   $csharpLabel

The property name changes from .Text to .Value and from .BarcodeFormat to .BarcodeType. The enum type changes from BarcodeFormat (MessagingToolkit) to BarcodeEncoding (IronBarcode), though .BarcodeType.ToString() produces a comparable human-readable string for display or logging purposes.

Generating Barcodes

MessagingToolkit.Barcode used an instance-based BarcodeEncoder with a property-set format before calling .Encode(). IronBarcode uses a static method with the encoding type as a parameter.

MessagingToolkit.Barcode Approach:

using MessagingToolkit.Barcode;

public void GenerateQrCode(string data, string outputPath)
{
    var encoder = new BarcodeEncoder();
    encoder.Format = BarcodeFormat.QrCode;
    var bitmap = encoder.Encode(data);
    bitmap.Save(outputPath);
}
using MessagingToolkit.Barcode;

public void GenerateQrCode(string data, string outputPath)
{
    var encoder = new BarcodeEncoder();
    encoder.Format = BarcodeFormat.QrCode;
    var bitmap = encoder.Encode(data);
    bitmap.Save(outputPath);
}
Imports MessagingToolkit.Barcode

Public Sub GenerateQrCode(data As String, outputPath As String)
    Dim encoder As New BarcodeEncoder()
    encoder.Format = BarcodeFormat.QrCode
    Dim bitmap = encoder.Encode(data)
    bitmap.Save(outputPath)
End Sub
$vbLabelText   $csharpLabel

IronBarcode Approach:

using IronBarCode;

public void GenerateQrCode(string data, string outputPath)
{
    BarcodeWriter.CreateBarcode(data, BarcodeEncoding.QRCode)
        .SaveAsPng(outputPath);
}
using IronBarCode;

public void GenerateQrCode(string data, string outputPath)
{
    BarcodeWriter.CreateBarcode(data, BarcodeEncoding.QRCode)
        .SaveAsPng(outputPath);
}
Imports IronBarCode

Public Sub GenerateQrCode(data As String, outputPath As String)
    BarcodeWriter.CreateBarcode(data, BarcodeEncoding.QRCode) _
        .SaveAsPng(outputPath)
End Sub
$vbLabelText   $csharpLabel

For creating Code 128 and other 1D barcodes, the same static pattern applies with a different encoding constant:

// Code 128
BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeEncoding.Code128)
    .SaveAsPng("code128.png");

// EAN-13
BarcodeWriter.CreateBarcode("5901234123457", BarcodeEncoding.EAN13)
    .SaveAsPng("ean13.png");
// Code 128
BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeEncoding.Code128)
    .SaveAsPng("code128.png");

// EAN-13
BarcodeWriter.CreateBarcode("5901234123457", BarcodeEncoding.EAN13)
    .SaveAsPng("ean13.png");
' Code 128
BarcodeWriter.CreateBarcode("PRODUCT-12345", BarcodeEncoding.Code128) _
    .SaveAsPng("code128.png")

' EAN-13
BarcodeWriter.CreateBarcode("5901234123457", BarcodeEncoding.EAN13) _
    .SaveAsPng("ean13.png")
$vbLabelText   $csharpLabel

Updating the Target Framework

Once MessagingToolkit.Barcode is removed and all references are replaced, the project file target framework can be updated. This change was blocked by the old dependency and becomes possible after removal:

MessagingToolkit.Barcode Approach (project file):

<PropertyGroup>
  <TargetFramework>net472</TargetFramework>
</PropertyGroup>
<PropertyGroup>
  <TargetFramework>net472</TargetFramework>
</PropertyGroup>
XML

IronBarcode Approach (project file):

<PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
XML

IronBarcode supports .NET Framework 4.6.2 through .NET 9, so it can be installed before the framework upgrade is finalized. This allows the migration to be staged: install IronBarcode alongside MessagingToolkit.Barcode, replace all usages, verify the new code, remove the old package, and then change the target framework as a final step.

Reading Barcodes from PDF Documents

MessagingToolkit.Barcode had no PDF support. Reading barcodes from a PDF required extracting images from each page through a separate library before calling the barcode decoder. IronBarcode reads PDF files directly through the same method used for images.

MessagingToolkit.Barcode Approach:

// Not supported — required external PDF page extraction before decode
// No equivalent exists in MessagingToolkit.Barcode
// Not supported — required external PDF page extraction before decode
// No equivalent exists in MessagingToolkit.Barcode
' Not supported — required external PDF page extraction before decode
' No equivalent exists in MessagingToolkit.Barcode
$vbLabelText   $csharpLabel

IronBarcode Approach:

using IronBarCode;

// Read all barcodes from every page of a PDF document
var results = BarcodeReader.Read("invoice.pdf");
foreach (var barcode in results)
{
    Console.WriteLine($"Page {barcode.PageNumber}: {barcode.Value} ({barcode.BarcodeType})");
}
using IronBarCode;

// Read all barcodes from every page of a PDF document
var results = BarcodeReader.Read("invoice.pdf");
foreach (var barcode in results)
{
    Console.WriteLine($"Page {barcode.PageNumber}: {barcode.Value} ({barcode.BarcodeType})");
}
Imports IronBarCode

' Read all barcodes from every page of a PDF document
Dim results = BarcodeReader.Read("invoice.pdf")
For Each barcode In results
    Console.WriteLine($"Page {barcode.PageNumber}: {barcode.Value} ({barcode.BarcodeType})")
Next
$vbLabelText   $csharpLabel

Applications that process scanned documents, shipping manifests, or multi-page invoice batches gain this capability as part of the migration without any additional library or configuration.

MessagingToolkit.Barcode API to IronBarcode Mapping Reference

MessagingToolkit.Barcode IronBarcode Notes
new BarcodeDecoder() Static — BarcodeReader.Read() No instance required
barcodeReader.Decode(bitmap) BarcodeReader.Read(path) Accepts path, stream, byte array, or PDF
result.Text result.Value Property renamed
result.BarcodeFormat result.BarcodeType Property renamed; enum type is BarcodeEncoding
new BarcodeEncoder() Static — BarcodeWriter.CreateBarcode() No instance required
barcodeWriter.Format = BarcodeFormat.QrCode BarcodeEncoding.QRCode (parameter) Format passed as parameter, not property
barcodeWriter.Encode("data") returns Bitmap BarcodeWriter.CreateBarcode("data", BarcodeEncoding.QRCode) Returns fluent result, not Bitmap
bitmap.Save("path.png") .SaveAsPng("path.png") Fluent method on result object
BarcodeFormat.QrCode BarcodeEncoding.QRCode Enum namespace and value renamed
BarcodeFormat.Code128 BarcodeEncoding.Code128 Same symbolic name, different namespace
BarcodeFormat.Ean13 BarcodeEncoding.EAN13 Capitalization differs
Returns null if not found Returns empty collection Check .Any() or .FirstOrDefault()
Bitmap input only Path, stream, byte array, PDF No System.Drawing required
.NET Framework 3.5–4.5 only .NET 4.6.2 through .NET 9 Full modern .NET support

Common Migration Issues and Solutions

Issue 1: Namespace Not Found After Package Update

Problem: After removing MessagingToolkit.Barcode and adding IronBarcode, compilation fails with CS0246: The type or namespace name 'BarcodeDecoder' could not be found.

Solution: The old namespace using MessagingToolkit.Barcode; must be replaced with using IronBarCode; (note the capital C) in every file that references the old library. A project-wide search for the old namespace string will locate all affected files:

grep -r "using MessagingToolkit.Barcode" --include="*.cs" .
grep -r "BarcodeDecoder\|BarcodeEncoder" --include="*.cs" .
grep -r "using MessagingToolkit.Barcode" --include="*.cs" .
grep -r "BarcodeDecoder\|BarcodeEncoder" --include="*.cs" .
SHELL

Issue 2: BarcodeReader Ambiguity Between Namespaces

Problem: If a project references both MessagingToolkit.Barcode and IronBarcode during a staged migration, BarcodeReader may be ambiguous between the two namespaces.

Solution: Qualify the reference explicitly during the transition period:

// Use the fully qualified name while both packages are installed
var results = IronBarCode.BarcodeReader.Read("barcode.png");
// Use the fully qualified name while both packages are installed
var results = IronBarCode.BarcodeReader.Read("barcode.png");
Imports IronBarCode

Dim results = BarcodeReader.Read("barcode.png")
$vbLabelText   $csharpLabel

Once all references to MessagingToolkit.Barcode have been replaced and the old package is removed, the qualifier can be dropped and the using IronBarCode; directive is sufficient.

Issue 3: Target Framework Still Set to net472 After Package Removal

Problem: After removing MessagingToolkit.Barcode and installing IronBarcode, the project file still targets net472. Build warnings indicate that modern .NET APIs are unavailable.

Solution: Update the <TargetFramework> element in the .csproj file once the dependency has been removed. IronBarcode supports both net472 (via .NET Framework 4.6.2 compatibility) and modern targets. Changing to net8.0 requires verifying that no other legacy dependencies remain in the project:


<TargetFramework>net8.0</TargetFramework>

<TargetFramework>net8.0</TargetFramework>
XML

Run dotnet build after the change to identify any remaining legacy dependencies that need to be addressed.

MessagingToolkit.Barcode Migration Checklist

Pre-Migration Tasks

Audit the codebase to identify all locations that reference MessagingToolkit.Barcode:

# Find all using statements
grep -r "using MessagingToolkit.Barcode" --include="*.cs" .

# Find decoder instantiations
grep -r "BarcodeDecoder" --include="*.cs" .

# Find encoder instantiations
grep -r "BarcodeEncoder" --include="*.cs" .

# Find decode calls
grep -r "\.Decode(" --include="*.cs" .

# Find encode calls
grep -r "\.Encode(" --include="*.cs" .

# Find project file references
grep -r "MessagingToolkit" --include="*.csproj" .
grep -r "MessagingToolkit" --include="packages.config" .
# Find all using statements
grep -r "using MessagingToolkit.Barcode" --include="*.cs" .

# Find decoder instantiations
grep -r "BarcodeDecoder" --include="*.cs" .

# Find encoder instantiations
grep -r "BarcodeEncoder" --include="*.cs" .

# Find decode calls
grep -r "\.Decode(" --include="*.cs" .

# Find encode calls
grep -r "\.Encode(" --include="*.cs" .

# Find project file references
grep -r "MessagingToolkit" --include="*.csproj" .
grep -r "MessagingToolkit" --include="packages.config" .
SHELL

Document all files that require changes. Note any locations where System.Drawing.Bitmap is used as input to the decoder — those usages will also need to be updated.

Code Update Tasks

  1. Run dotnet remove package MessagingToolkit.Barcode to remove the package
  2. Run dotnet add package IronBarcode to install IronBarcode
  3. Add IronBarCode.License.LicenseKey = "YOUR-KEY"; at application startup
  4. Replace all using MessagingToolkit.Barcode; statements with using IronBarCode;
  5. Replace all new BarcodeDecoder() patterns with BarcodeReader.Read() static calls
  6. Replace all new BarcodeEncoder() patterns with BarcodeWriter.CreateBarcode() static calls
  7. Update all result.Text references to result.Value
  8. Update all result.BarcodeFormat references to result.BarcodeType
  9. Update all barcodeWriter.Format = BarcodeFormat.X patterns to pass encoding as parameter
  10. Replace bitmap.Save() with .SaveAsPng() or the appropriate output method on the IronBarcode result
  11. Remove using System.Drawing; imports where they were used only for Bitmap input to MessagingToolkit
  12. Update <TargetFramework> in the project file if a framework upgrade is part of the migration

Post-Migration Testing

  • Verify that dotnet build completes with zero errors and zero references to MessagingToolkit
  • Run grep -r "MessagingToolkit" --include="*.cs" . and confirm zero results
  • Test barcode reading with real barcode images from your application and confirm .Value returns the expected string
  • Test barcode reading with multi-barcode images and confirm all barcodes in the collection are returned
  • Test barcode generation and verify the output file matches the expected format and encoding
  • If PDF reading is used, test with a representative PDF document and verify page number metadata is correct
  • If the target framework was changed, run the full test suite on the new runtime to identify any other compatibility issues

Key Benefits of Migrating to IronBarcode

Unblocked Framework Upgrades: Once MessagingToolkit.Barcode is removed, the project file target framework can be updated to any modern .NET version. This single change enables access to .NET 8 performance improvements, C# 12 language features, native async patterns, and the full ecosystem of NuGet packages that require .NET Standard 2.0 or later.

Cross-Platform Deployment: IronBarcode's internal image pipeline does not depend on System.Drawing, which is Windows-only in .NET 6 and later. After migration, applications can be deployed to Linux servers, macOS development environments, Docker containers, and cloud function runtimes without encountering PlatformNotSupportedException from the barcode library.

Resolved Compliance Findings: IronBarcode receives regular security updates through a documented maintenance process. Replacing an abandoned dependency with an actively maintained one resolves audit findings under PCI DSS, HIPAA, SOC 2, and similar frameworks that require active patch management of third-party libraries.

Native PDF Support: BarcodeReader.Read() accepts PDF file paths directly, eliminating the need for a separate PDF image extraction step before barcode decoding. Applications that process scanned documents or invoice batches benefit from this capability without adding new libraries or pipeline stages.

Expanded Output Options: Generated barcodes are available as PNG, JPEG, SVG, PDF, or base64-encoded strings through the fluent result object returned by BarcodeWriter.CreateBarcode(). This replaces the System.Drawing.Bitmap return type from MessagingToolkit.Barcode, removing the Windows-only output constraint and enabling direct embedding in web responses or database storage.

Please noteMessagingToolkit and ZXing.NET are registered trademarks of their respective owners. This site is not affiliated with, endorsed by, or sponsored by MessagingToolkit or ZXing.NET. All product names, logos, and brands are property of their respective owners. Comparisons are for informational purposes only and reflect publicly available information at the time of writing.

Frequently Asked Questions

Why should I migrate from MessagingToolkit Barcode to IronBarcode?

Common reasons include simplifying licensing (removing SDK + runtime key complexity), eliminating throughput limits, gaining native PDF support, improving Docker/CI/CD deployment, and reducing API boilerplate in production code.

How do I replace MessagingToolkit API calls with IronBarcode?

Replace instance creation and licensing boilerplate with IronBarCode.License.LicenseKey = "key". Replace reader calls with BarcodeReader.Read(path) and writer calls with BarcodeWriter.CreateBarcode(data, encoding). Static methods require no instance management.

How much code changes when migrating from MessagingToolkit Barcode to IronBarcode?

Most migrations result in fewer lines of code. Licensing boilerplate, instance constructors, and explicit format configuration are removed. Core read/write operations map to shorter IronBarcode equivalents with cleaner result objects.

Do I need to keep both MessagingToolkit Barcode and IronBarcode installed during migration?

No. Most migrations are direct replacements rather than parallel operation. Migrate one service class at a time, replace the NuGet reference, and update the instantiation and API call patterns before moving to the next class.

What is the NuGet package name for IronBarcode?

The package is 'IronBarCode' (with capital B and C). Install it with 'Install-Package IronBarCode' or 'dotnet add package IronBarCode'. The using directive in code is 'using IronBarCode;'.

How does IronBarcode simplify Docker deployment compared to MessagingToolkit Barcode?

IronBarcode is a NuGet package with no external SDK files or mounted license configuration. In Docker, set the IRONBARCODE_LICENSE_KEY environment variable and the package handles license validation at startup.

Does IronBarcode detect all barcode formats automatically after migrating from MessagingToolkit?

Yes. IronBarcode auto-detects symbology across all supported formats. Explicit BarcodeTypes enumeration is not required. If format is already known and performance matters, BarcodeReaderOptions allows restricting the search space as an optimization.

Can IronBarcode read barcodes from PDFs without a separate library?

Yes. BarcodeReader.Read("document.pdf") processes PDF files natively. Results include PageNumber, Format, Value, and Confidence for each barcode found. No external PDF rendering step is required.

How does IronBarcode handle parallel barcode processing?

IronBarcode's static methods are stateless and thread-safe. Use Parallel.ForEach directly over file lists without per-thread instance management. BarcodeReaderOptions.MaxParallelThreads controls the internal thread budget.

What result properties change when migrating from MessagingToolkit Barcode to IronBarcode?

Common renames: BarcodeValue becomes Value, BarcodeType becomes Format. IronBarcode results also add Confidence and PageNumber. A solution-wide search-and-replace handles the renames in existing result-processing code.

How do I set up IronBarcode licensing in a CI/CD pipeline?

Store IRONBARCODE_LICENSE_KEY as a pipeline secret and assign IronBarCode.License.LicenseKey in application startup code. One secret covers all environments including development, test, staging, and production.

Does IronBarcode support QR code generation with custom styling?

Yes. QRCodeWriter.CreateQrCode() supports custom colors via ChangeBarCodeColor(), logo embedding via AddBrandLogo(), configurable error correction levels, and multiple output formats including PNG, JPG, PDF, and stream.

Jordi Bardia
Software Engineer
Jordi is most proficient in Python, C# and C++, when he isn’t leveraging his skills at Iron Software; he’s game programming. Sharing responsibilities for product testing, product development and research, Jordi adds immense value to continual product improvement. The varied experience keeps him challenged and engaged, and he ...
Read More

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me