CodexIT.OmrKit.Core 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package CodexIT.OmrKit.Core --version 2.0.0
                    
NuGet\Install-Package CodexIT.OmrKit.Core -Version 2.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="2.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="2.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 2.0.0
                    
#r "nuget: CodexIT.OmrKit.Core, 2.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@2.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=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=CodexIT.OmrKit.Core&version=2.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 2.0.0

This also pulls CodexIT.OmrKit.Abstractions.

Migration Notes (v2.0.0)

  • Breaking: GeneratePdf now requires includeWritingArea.
    • GeneratePdf(spec, true) to draw the writing area.
    • GeneratePdf(spec, false) to keep that area blank.
  • Breaking: essay question support was removed from question contracts and validation.
  • Added localized structured exceptions with Code, MessageKey, and Context.

DI Registration

services.AddCodexOmrKit(options =>
{
    options.PrimaryEngine = OmrEngineKind.OpenCvOtsu;
    options.SecondaryEngine = OmrEngineKind.OpenCvAdaptiveMean;
    options.DefaultLanguage = PaperLanguage.English; // Controls localized exception message language
});

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

2.0.0 - Breaking release.
- GeneratePdf now requires includeWritingArea flag.
- Removed all Essay question handling from core scanning/generation flow.
- Added localized and structured package exceptions for SmartSchool integration.
- Added stronger exception wrapping around decode/alignment/engine stages.