Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
329 posts found
What Changed in the .NET SDK from .NET 6 to 11: Release Publish by Default, Terminal Logger, .slnx, dnx, File-Based Apps and the .NET 11 CLI
Backend PART 09

What Changed in the .NET SDK from .NET 6 to 11: Release Publish by Default, Terminal Logger, .slnx, dnx, File-Based Apps and the .NET 11 CLI

What breaks when you upgrade the SDK is usually not the code but the places that repeat the version: the errorMessage in global.json, container image tags and CI steps. We tabulate SDK changes from .NET 6 to 11, give a checklist for reading an old project, move Bookstore to SDK 11 while keeping it on net10.0, and measure the MSBuild server's effect in CI.

15 Nov 2026 10 min 6
Understanding MSBuild: Properties, Items, Targets, Tasks, Custom Targets and Debugging Builds with Binlogs
Backend PART 08

Understanding MSBuild: Properties, Items, Targets, Tasks, Custom Targets and Debugging Builds with Binlogs

MSBuild processes a project in two phases: evaluation reads properties and items, execution runs targets, and values created in targets are invisible during evaluation. We add targets to Bookstore that write commit and local-change information into the assembly and add the Angular client to publish incrementally with Inputs/Outputs, and we use a binlog to find where a property changed, with real output.

15 Nov 2026 10 min 9
dotnet tools and dotnet new Templates: Local Tool Manifests, dnx, Packaging Your Own Tool and Template
Backend PART 07

dotnet tools and dotnet new Templates: Local Tool Manifests, dnx, Packaging Your Own Tool and Template

The way to tie a .NET tool to a repo is a local tool manifest: the version is committed in dotnet-tools.json and CI starts with dotnet tool restore. We package bookstore-admin with PackAsTool and install it in Reporting from the internal feed, and show with real output how dnx respects source mapping, SDK 11's NETSDK1235 warning, the bookstore-module template package and a file-based script that uses #:include.

15 Nov 2026 13 min 7
Publish Options: Framework-Dependent, Self-Contained, Single-File, Trimming, ReadyToRun and Native AOT
Backend PART 06

Publish Options: Framework-Dependent, Self-Contained, Single-File, Trimming, ReadyToRun and Native AOT

A framework-dependent publish gives the smallest output and gets runtime patches from the machine; self-contained, single-file, trimming and Native AOT make shipping easier but tie patches to republishing. We publish bookstore-admin in seven modes and measure size, startup and memory, and show with real output why trimming without R2R slows startup, how to move trim warnings into the build, AOT's cross-OS limit and a publish profile.

15 Nov 2026 11 min 8
Multi-Targeting and Conditional Builds: TargetFrameworks, #if, Platform APIs and Libraries Across Versions
Backend PART 05

Multi-Targeting and Conditional Builds: TargetFrameworks, #if, Platform APIs and Libraries Across Versions

To build a library for several .NET versions you write TargetFrameworks, but if Directory.Build.props sets a single TargetFramework the project silently builds one target; you have to clear it in the project. We build Bookstore.Contracts for net8.0 and net10.0 with a .NET 8 fallback for .NET 10's NumericOrdering, run the tests on both frameworks, and show the cost of netstandard2.0, CA1416 platform checks and a consumer still on .NET 8, with real output.

15 Nov 2026 10 min 8
Managing NuGet Restore: nuget.config, Package Source Mapping, Lock Files, Private Feeds and Minimum Publish Age
Backend PART 04

Managing NuGet Restore: nuget.config, Package Source Mapping, Lock Files, Private Feeds and Minimum Publish Age

With several NuGet sources and no package source mapping, an outside package with the same name can be chosen over the internal one; mapping takes each package only from the source allowed for it. We put Bookstore.Contracts on a private feed whose credentials come from environment variables and show the nuget.config hierarchy, lock files and locked mode, the .NET 11 minimum publish age setting, NuGetAudit's dependence on the feed and restore caching in CI, with real output.

15 Nov 2026 12 min 9
Multi-Project Solution Layout: Directory.Build.props/targets, Central Package Management and Shared Settings
Backend PART 03

Multi-Project Solution Layout: Directory.Build.props/targets, Central Package Management and Shared Settings

Directory.Build.props is read from inside Sdk.props before the csproj, so it cannot see values such as OutputType or IsPackable; project-dependent decisions belong in Directory.Build.targets, though values the SDK derived earlier don't change there either. We set up a nested props chain, artifacts output, central package management, transitive pinning, VersionOverride and an analyzer added with GlobalPackageReference in Bookstore, with real build output.

15 Nov 2026 12 min 7
Anatomy of a csproj: SDK-Style Projects, Common Properties, Items and Implicit Behaviors
Backend PART 02

Anatomy of a csproj: SDK-Style Projects, Common Properties, Items and Implicit Behaviors

An SDK-style csproj stays short thanks to the imports added by the Sdk attribute, Directory.Build.props and default globs such as **/*.cs; dotnet msbuild -getProperty shows a property's real value, -getItem shows items and -preprocess the whole file. We read Bookstore's project files, remove template duplication and show with real output why appsettings.json isn't copied in a console project, plus InvariantGlobalization, PrivateAssets and InternalsVisibleTo.

15 Nov 2026 11 min 6
A Map of the dotnet CLI: SDK vs Runtime, the Command Families, global.json and SDK Version Selection
Backend PART 01

A Map of the dotnet CLI: SDK vs Runtime, the Command Families, global.json and SDK Version Selection

The dotnet command picks its SDK from the first global.json it finds walking up from the current folder; without rollForward it only moves within the same feature band, while runtimeconfig.json decides which runtime runs the app. We add projects to Bookstore.slnx with the CLI, compare the rollForward policies with three installed SDKs, and show the difference between the 10.0.1xx and 10.0.4xx bands, workloads and the .NET 11 CLI changes with real output.

15 Nov 2026 15 min 6
HTTP Clients in Go: http.Client, Timeouts, Cancellation with context, Reusing the Transport and Retries
Backend PART 19

HTTP Clients in Go: http.Client, Timeouts, Cancellation with context, Reusing the Transport and Retries

In Go, http.DefaultClient has no timeout; in production you use one shared http.Client, Transport timeouts for each phase, Client.Timeout per attempt and a context for the total budget. Which timeout covers which phase, Go 1.27 reading small bodies on Close to reuse the connection, MaxIdleConnsPerHost, checking 4xx/5xx, retries with backoff, jitter and Retry-After, idempotency, and testing a client with httptest.

15 Nov 2026 12 min 11
io.Reader/io.Writer, os and bufio in Go: File Operations, Composing Streams and embed
Backend PART 18

io.Reader/io.Writer, os and bufio in Go: File Operations, Composing Streams and embed

In Go a file, a gzip stream, an HTTP body and a string all satisfy the same single-method io.Reader; when a function takes an io.Reader instead of a file name, a 1 GB log is processed with constant memory. bufio.Scanner's 64 KB line limit and silent stop, the Close error of a written file, flushing csv.Writer, composition with LimitReader/MultiWriter/TeeReader, and embedding an e-mail template into the binary with //go:embed.

15 Nov 2026 12 min 9
The slices, maps, sort and cmp Packages in Go: Sorting, Searching, Grouping and Collection Work with Iterators
Backend PART 17

The slices, maps, sort and cmp Packages in Go: Sorting, Searching, Grouping and Collection Work with Iterators

In Go, multi-field sorting combines slices.SortStableFunc with cmp.Or and cmp.Compare; map iteration order changes on every run, and sorted keys need slices.Sorted(maps.Keys(m)). Adding ?sort= and a category summary to Bookstore, LINQ counterparts, backing-array traps with append and slices.Delete, json/v2 map order, measuring sort against slices, and Turkish sorting with x/text/collate.

15 Nov 2026 12 min 11
Blog Map