Skip to content

Roadmap 4x

Daniel Frantík edited this page Jul 20, 2026 · 12 revisions

Roadmap — tik4net 4.x

High-level overview of what is planned for future 4.x releases.

✅ Shipped in 4.0.0-alpha

The initial 4.0.0-alpha delivered the items below — each is documented on its own page, so they are only listed here (see History for the full release notes):

✅ Shipped in 4.0.0-alpha2

  • Package consolidation — the O/R mapper moved into the main tik4net package; tik4net.objects / tik4net.entities are no longer published. See Upgrading from 3.x to 4.0.

TikLink — async fluent API

A new high-level entry point that wraps the existing connection and entity layers behind a clean, async-first interface:

await using var link = await TikLink.ConnectAsync("192.168.1.1", "admin", "pwd");

var rules = await link.Ip.Firewall.Filter
    .Where(r => r.Chain == "input")
    .ToListAsync();

var rule = await link.Ip.Firewall.Filter.GetAsync("*1");
rule.Comment = "WAN";
await link.SaveAsync(rule);   // uses change tracking

All operations are async/await. The existing synchronous ITikConnection API remains fully supported.


Path-based navigation

The TikLink object exposes a typed tree that mirrors the MikroTik CLI hierarchy — link.Ip.Firewall.Filter, link.System.Identity, link.Interface, etc. — instead of requiring a generic Query<T>() call.

Note: The tree will initially be hand-written for the most common paths (~50). Automatic generation from [TikEntity] attributes via a Roslyn source generator is planned as a follow-up step — we need to explore the complexity first.


Typed command wrappers

First-class wrappers for non-CRUD commands with fluent builders:

await link.System.Reboot.ExecuteAsync();

await foreach (var ping in link.Tool.Ping
    .Address("8.8.8.8").Count(5).ExecuteAsync(ct))
{
    Console.WriteLine(ping.Time);
}

SyncListAsync with reordering

Bulk sync of a local list against the router, including support for ordered entities (firewall rules, queue trees). Computes the minimal set of add / update / delete / move operations needed to bring the router to the desired state.


Dependency injection integration

IServiceCollection extension for ASP.NET Core / generic host applications:

services.AddTikLink(opt => {
    opt.Host = config["MikroTik:Host"];
    opt.User = config["MikroTik:User"];
    opt.Password = config["MikroTik:Password"];
});

Scoped lifetime (DbContext-style). Connection pooling TBD.


Platform targets cleanup

Drop legacy targets (net35 / net40 / netcoreapp1.x are already gone as of 3.6). For 4.x we plan to target net6.0 / net8.0 + netstandard2.0 / netstandard2.1, and enable #nullable reference types across the codebase.

.NET Framework 4.8 remains fully supported via netstandard2.0 and will continue to be tested.


Documentation

  • Supported-entities index — a generated wiki page listing all built-in [TikEntity] classes with their API paths, so users can see coverage at a glance.
  • Refresh High-level API tools — re-verify the entity generator / wiki importer workflow (the MikroTik wiki the importer parses has moved to help.mikrotik.com) and finish the "advanced usage" section.
  • Compile-checked wiki samples — extract the wiki's C# code blocks into a compile-only test project so samples cannot drift from the API again.

TikValue — flexible property model (under consideration)

MikroTik increasingly uses property values that typed enums cannot represent: negations (!dynamic), comma-separated combinations, version-dependent strings. A TikValue wrapper struct could expose these naturally while staying implicit-convertible from string.

This would be a breaking change to the entity model. We will evaluate scope and migration cost before committing.


📋 Release chores before 4.0.0 stable

Maintainer checklist — things that cannot be automated and are easy to forget.

  • Deprecate the tik4net.entities package on nuget.org. ⚠️ Manual, web UI only. There is no CLI command for this — dotnet nuget only offers delete / push / verify / trust / sign / why, so it cannot be scripted into the publish workflow.
    • Where: nuget.orgManage packageDeprecation
    • Reason: Legacy, alternate package: tik4net
    • Do this after 4.0.0 stable ships, not during the alphas — the alternate-package pointer should resolve to a stable version.
    • Background: tik4net.entities was the mapper's package ID for the 4.0 alphas only. Since 4.0.0-alpha2 the mapper ships inside tik4net, so the ID is dead. No replacement package is published for it — a single alpha does not justify a permanent empty package on nuget.org.
    • The same applies to tik4net.objects if that ID is ever recovered (it is currently held by a third party, see Upgrading from 3.x to 4.0). That one does have real 3.x users, so a forwarding package is worth reconsidering there.

⚠️ Breaking changes (for release notes)

Running list of behavioural / API-surface changes on the 4.x line that need to be called out in the 4.0 release notes. Most are source-compatible for typical try/catch usage; the binary-compatibility notes matter only for plugins/assemblies compiled against 3.x.

Exception model

  • TikSentenceException now derives from TikConnectionException (was System.Exception). Catching TikConnectionException now also catches malformed-sentence errors — the documented "one root catches everything" contract. Source-compatible (a widening: existing catch (TikSentenceException) / catch (Exception) still work); binary-breaking (base type changed).
  • Exception serialization removed. [Serializable], the ISerializable/SerializationInfo constructors and GetObjectData were dropped from TikConnectionException and TikConnectionCapabilityNotSupportedException (the plumbing was incomplete across leaf types, carried non-serializable members, and BinaryFormatter is obsolete on the netstandard2.0/2.1 targets). Code relying on binary/remoting serialization of tik4net exceptions must use ToString() / structured logging instead.
  • WinBox Native error mapping changed. An unrecognized router-reported M2 error now surfaces as TikCommandTrapException instead of TikCommandUnexpectedResponseException, matching the API/CLI/REST generic-error fallback. Callers that special-cased TikCommandUnexpectedResponseException for WinBox-native router errors should catch TikCommandTrapException (or its base TikCommandException) instead.

See Exception handling for the full tree and per-type semantics.

Save semantics

  • Save default mode changed to OnlyChangesSave diffs against a local snapshot instead of performing a LoadById round-trip. Entities not loaded via Load* are sent in full. To restore 3.x behavior globally: TikDefaults.SaveMode = TikSaveMode.FullUpdate; See Change tracking.

Platform targets

  • Legacy targets dropped; 4.x targets net6.0 / net8.0 + netstandard2.0 / netstandard2.1 with #nullable enabled. .NET Framework 4.8 remains supported via netstandard2.0. (See Platform targets cleanup above.)

Clone this wiki locally