Skip to content

Upgrading from 3.x to 4.0

Daniel Frantík edited this page Jul 20, 2026 · 1 revision

Upgrading from 3.x to 4.0

The short version: your code does not change, your package references do.

Namespaces (tik4net, tik4net.Objects, …), class names and assembly file names are all the same as in 3.x. The only thing that moved is how the assemblies are distributed on NuGet.


1. Remove the tik4net.objects package reference ⚠️

This is the one step you must not skip.

In 3.x the O/R mapper was a separate NuGet package. Since 4.0 tik4net.objects.dll ships inside the tik4net package, so a leftover reference gives you the same assembly from two sources and the build fails with a conflict — or, worse, silently binds an old 3.x mapper against the 4.0 core.

- <PackageReference Include="tik4net" Version="3.6.0" />
- <PackageReference Include="tik4net.objects" Version="3.6.0" />
+ <PackageReference Include="tik4net" Version="4.0.0" />

Or on the command line:

dotnet remove package tik4net.objects
dotnet add package tik4net

A warning about tik4net.objects on nuget.org. That package ID is currently held by a third party, not by this project. It is an unofficial republication of tik4net that we do not control or endorse. Do not add it to a 4.x project.

If you were on one of the 4.0.0-alpha prereleases, the same applies to tik4net.entities, the short-lived name the mapper package had during the 4.0 alphas:

dotnet remove package tik4net.entities

2. Check your using directives — spoiler: they are fine

Nothing to do here. This still works unchanged:

using tik4net;
using tik4net.Objects;
using tik4net.Objects.Ip;
using tik4net.Objects.Interface;

The assembly is still called tik4net.objects.dll, so Assembly.Load("tik4net.objects") and any <Reference Include="tik4net.objects" /> in old-style projects keep working too.

3. Rebuild

dotnet restore --force
dotnet build

--force matters: NuGet caches the old resolution and can otherwise keep a stale tik4net.objects.dll in obj/project.assets.json.


Package map, 3.x → 4.0

3.x 4.0 Note
tik4net tik4net now also contains the O/R mapper
tik4net.objects (gone — part of tik4net) remove the reference
tik4net.entities (4.0 alphas only) (gone — part of tik4net) deprecated, remove the reference
tik4net.testing tik4net.testing unchanged, still separate
tik4net.ssh new in 4.0, separate because of Renci.SshNet

Why the merge?

The mapper has no dependencies of its own, so there was never a technical reason to ship it apart from the core — and in practice almost everyone installed both. One package also removes a recurring source of confusion between the package ID, the assembly name and the third-party republication mentioned above.

Other 4.0 changes

Package layout is only part of the release. For the new transports (REST, Telnet, SSH, MAC-Telnet, WinBox CLI and native) and the API changes, see Version history and Connection types and capabilities.

Still stuck?

Open an issue with your .csproj package references and the exact build error.

Clone this wiki locally