Mert Özen Further With Every Line

Blog

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

Series
9 posts found
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
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
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
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-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
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
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
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
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
Blog Map