CodexIT.OmrKit.Core 4.0.0

dotnet add package CodexIT.OmrKit.Core --version 4.0.0
                    
NuGet\Install-Package CodexIT.OmrKit.Core -Version 4.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodexIT.OmrKit.Core" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodexIT.OmrKit.Core" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="CodexIT.OmrKit.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodexIT.OmrKit.Core --version 4.0.0
                    
#r "nuget: CodexIT.OmrKit.Core, 4.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodexIT.OmrKit.Core@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodexIT.OmrKit.Core&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CodexIT.OmrKit.Core&version=4.0.0
                    
Install as a Cake Tool

CodexIT.OmrKit.Core

Core runtime for answer-sheet generation and OMR scanning.

NuGet package ID: CodexIT.OmrKit.Core
C# namespace remains Codex.OmrKit.Core.

Package Boundary

This is the production runtime package.

  • Owns layout, rendering, QR payload behavior, alignment, and bubble detection.
  • Depends on CodexIT.OmrKit.Abstractions for stable contracts.
  • Is independent from API/UI hosts.

Install

dotnet add package CodexIT.OmrKit.Core --version 4.0.0

This also pulls CodexIT.OmrKit.Abstractions.

License

This package requires a permanent LicenseKey.
To request a license, contact WhatsApp: 00218917128473 (open chat).

Migration Notes (v4.0.0)

  • Breaking: QuestionType numeric values changed.
    • QuestionType.MultipleChoice = 1
    • QuestionType.TrueFalse = 2
  • Breaking: OmrLicense.Issue is no longer public. Generate keys from the sample API/UI (/licenses), then paste LicenseKey into consumer appsettings.

DI Registration

services.AddCodexOmrKit(options =>
{
    configuration.GetSection("CodexOmrKit").Bind(options);
});

SmartSchool appsettings.json:

{
  "CodexOmrKit": {
    "LicenseKey": "OMRKIT....",
    "DefaultLanguage": "Arabic",
    "PrimaryEngine": "OpenCvOtsu",
    "SecondaryEngine": "OpenCvAdaptiveMean"
  }
}

Generate the LicenseKey from the sample API/UI (/licenses), then paste it here. GeneratePdf and Scan fail with configuration_error until a valid key is configured.

If you build a standalone console/service host, also reference Microsoft.Extensions.DependencyInjection to call BuildServiceProvider(). ASP.NET hosts already provide it.

Exception Mapping for SmartSchool

Catch OmrKitException and map behavior by ex.Code:

  • validation_error: invalid test/question input
  • quality_gate_rejected: scan image quality is too low
  • alignment_failed: sheet markers/alignment failed
  • decode_error: unsupported or corrupted upload
  • configuration_error: runtime configuration/engine registration issue
  • payload_error: invalid QR payload contract
try
{
    var scan = scanService.Scan(fileBytes, spec);
}
catch (OmrKitException ex)
{
    logger.LogWarning("OMR error {Code} key={Key} stage={Stage}", ex.Code, ex.MessageKey, ex.Context?.Stage);
    throw;
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 116 9/27/2026
3.0.0 102 9/21/2026
2.0.0 102 9/16/2026

4.0.0 - Breaking release.
- QuestionType numeric values are now MultipleChoice = 1 and TrueFalse = 2.
- OmrLicense.Issue is no longer public. Consumers must use a LicenseKey issued from the sample API/UI.