Migrate from 9.x to 11.x
Dynamsoft Barcode Reader SDK has been refactored to integrate with the DynamsoftCaptureVision (DCV) architecture since version 10.0. This guide helps you upgrade from version 9.x by highlighting the key API changes and providing migration paths.
The actual migration effort depends on which APIs you currently use. In many cases, only the interfaces you actively use need to be updated — review the sections below to identify the changes that affect your integration.
If you are new to the DCV architecture and prefer to start fresh, refer to the User Guide for a quick-start tutorial.
Update the License Key
You may need to update your license key before upgrading to version 11.x.
- 30-Day Free Trial License: Visit the Request a Trial License page to obtain a free license for evaluation.
- Annual Online Full License: Your license will continue to work with the new SDK version. Go to Customer Portal to get your license key.
- Perpetual License: Please contact our sales team to update your license.
Migrate to New Package
As of version 10.0, the NuGet package Dynamsoft.DotNet.Barcode has been renamed to Dynamsoft.DotNet.BarcodeReader.Bundle to reflect changes in both architecture and API design. Run the following command to install the new package:
NuGet\Install-Package Dynamsoft.DotNet.BarcodeReader.Bundle
Migrate License Activation Code
Starting from 10.0, we have unified the API for setting licenses across different Dynamsoft products.
| Old APIs | New APIs |
|---|---|
BarcodeReader.InitLicense |
LicenseManager.InitLicense |
Migrate Decoding APIs
Single Image Decoding
The APIs for decoding single image have been adjusted as follows:
| Old APIs | New APIs |
|---|---|
BarcodeReader.DecodeFile |
CaptureVisionRouter.Capture |
BarcodeReader.DecodeFileInMemory |
CaptureVisionRouter.Capture |
BarcodeReader.DecodeBuffer |
CaptureVisionRouter.Capture |
class TextResult |
class BarcodeResultItem |
BarcodeReader.DecodeBase64String |
ImageIO.ReadFromBase64String + CaptureVisionRouter.Capture |
BarcodeReader.DecodeBitmap |
ImageIO.ReadFromBitmap + CaptureVisionRouter.Capture |
Video Streaming Decoding
ImageSourceAdapter is added to replace the FrameDecodingParameters and the previous video methods. You should implement ImageSourceAdapter to transfer image data from camera or video file to buffer.
Migrate Template APIs
The template-based APIs have been updated as follows:
| Old APIs | New APIs |
|---|---|
BarcodeReader.InitRuntimeSettingsWithFile |
CaptureVisionRouter.InitSettingsFromFile |
BarcodeReader.InitRuntimeSettingsWithString |
CaptureVisionRouter.InitSettings |
BarcodeReader.OutputSettingsToFile |
CaptureVisionRouter.OutputSettingsToFile |
BarcodeReader.OutputSettingsToString |
CaptureVisionRouter.OutputSettings |
BarcodeReader.ResetRuntimeSettings |
CaptureVisionRouter.ResetSettings |
BarcodeReader.AppendTplFileToRuntimeSettings |
Not available. |
BarcodeReader.AppendTplStringToRuntimeSettings |
Not available. |
BarcodeReader.GetAllParameterTemplateNames |
Not available. |
Upgrade Template Files
The template file format has changed in the new version. Templates created for version 9.x are not compatible with version 11.x. Use the Template Upgrade Tool to automatically convert your existing templates to the new format.
Migrate Runtime Settings
The struct PublicRuntimeSettings has been refactored. It retains commonly used properties via SimplifiedCaptureVisionSettings while removing the previously complex property settings, which are now exclusively supported through templates.
The APIs for accessing and updating PublicRuntimeSettings have been adjusted as follows:
| Old APIs | New APIs |
|---|---|
BarcodeReader.GetRuntimeSettings |
CaptureVisionRouter.GetSimplifiedSettings |
BarcodeReader.UpdateRuntimeSettings |
CaptureVisionRouter.UpdateSettings |
Properties with Direct API Replacement
The following properties are replaced by similar properties under SimplifiedCaptureVisionSettings or SimplifiedBarcodeReaderSettings. They can also be set via a template file.
SimplifiedCaptureVisionSettings
| PublicRuntimeSettings Property | SimplifiedCaptureVisionSettings Parameter | Template File Parameter |
|---|---|---|
Region |
roi & roiMeasuredInPercentage | TargetROIDef.Location.Offset |
Timeout |
timeout | CaptureVisionTemplates.Timeout |
SimplifiedBarcodeReaderSettings
| PublicRuntimeSettings Property | SimplifiedBarcodeReaderSettings Property | Template File Parameter |
|---|---|---|
MinBarcodeTextLength |
minBarcodeTextLength | BarcodeFormatSpecification.BarcodeTextLengthRangeArray |
MinResultConfidence |
minResultConfidence | BarcodeFormatSpecification.MinResultConfidence |
LocalizationModes |
localizationModes | BarcodeReaderTaskSetting.LocalizationModes |
ExpectedBarcodesCount |
expectedBarcodesCount | BarcodeReaderTaskSetting.ExpectedBarcodesCount |
BarcodeFormatIds |
barcodeFormatIds | BarcodeReaderTaskSetting.BarcodeFormatIds |
BarcodeFormatIds_2 |
barcodeFormatIds | BarcodeReaderTaskSetting.BarcodeFormatIds |
DeblurModes |
deblurModes | BarcodeReaderTaskSetting.DeblurModes |
DeblurLevel |
deblurModes | BarcodeReaderTaskSetting.DeblurModes |
MaxAlgorithmThreadCount |
maxThreadsInOneTask | BarcodeReaderTaskSetting.MaxThreadsInOneTask |
Remarks:
- The 2 groups of barcode formats are merged.
DeblurLevelis deprecated. You can useDeblurModesinstead.
| FurtherModes Property | SimplifiedBarcodeReaderSettings Property | Template File Parameter |
|---|---|---|
GrayscaleTransformationModes |
grayscaleTransformationModes | ImageParameter.GrayscaleTransformationModes |
ImagePreprocessingModes |
grayscaleEnhancementModes | ImageParameter.GrayscaleEnhancementModes |
Remarks: The mode
IPM_MORPHOLOGYofImagePreprocessingModesis migrated toBinarizationModes. The mode argumentsMorphOperation,MorphOperationKernelSizeX,MorphOperationKernelSizeY,MorphShapeare now available for all modes ofBinarizationModes.
Properties Requiring Template File
The following properties can only be set via a template file. Please call BarcodeReader.OutputSettingsToFile first with the old version to export the settings and then use the Template Upgrade Tool to upgrade your template.
| PublicRuntimeSettings Property | Template File Parameter |
|---|---|
ScaleDownThreshold |
ImageParameter.ImageScaleSettings |
BinarizationModes |
ImageParameter.BinarizationModes |
TextResultOrderModes |
BarcodeReaderTaskSetting.TextResultOrderModes |
ReturnBarcodeZoneClarity |
BarcodeReaderTaskSetting.ReturnBarcodeZoneClarity |
ScaleUpModes |
BarcodeReaderTaskSetting.BarcodeScaleModes |
BarcodeZoneMinDistanceToImageBorders |
BarcodeFormatSpecification.BarcodeZoneMinDistanceToImageBorders |
| FurtherModes Property | Template File Parameter |
|---|---|
ColourConversionModes |
ImageParameter.ColourConversionModes |
RegionPredetectionModes |
BarcodeReaderTaskSetting.RegionPredetectionModes |
TextureDetectionModes |
ImageParameter.TextureDetectionModes |
TextFilterModes |
ImageParameter.TextDetectionMode & ImageParameter.IfEraseTextZone |
DPMCodeReadingModes |
BarcodeReaderTaskSetting.DPMCodeReadingModes |
DeformationResistingModes |
BarcodeReaderTaskSetting.DeformationResistingModes |
BarcodeComplementModes |
BarcodeReaderTaskSetting.BarcodeComplementModes |
Properties Migrated to Other APIs
The PDF properties of PublicRuntimeSettings are moved to set via the SetPDFReadingParameter method of DirectoryFetcher and FileFetcher with a PDFReadingParameter parameter.
| PublicRuntimeSettings Property |
|---|
PDFReadingMode |
PDFRasterDPI |
Removed Properties (No Replacement)
The following properties are removed.
| PublicRuntimeSettings Property |
|---|
barcodeColourModes |
intermediateResultTypes |
intermediateResultSavingMode |
resultCoordinateType |
terminatePhase |
| FurtherModes Property |
|---|
ColourClusteringModes |