# .NET Core;Observability

Published articles for .NET Core;Observability.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Stripping extra dependencies in .NET NativeAOT apps using linker substitutions

DevFeed: [Stripping extra dependencies in .NET NativeAOT apps using linker substitutions](<https://devfeed.tech/articles/stripping-extra-dependencies-in-net-nativeaot-apps-using-linker-substitutions-65543.md>)

Original publisher: [Read original article](<https://andrewlock.net/stripping-extra-dependencies-in-.net-nativeaot-apps-using-linker-substitutions/>)

Author: Andrew Lock

Published: 2026-10-06T10:00:00Z

Content type: tutorial

Language: en

Sources: [Andrew Lock | .NET Escapades](<https://devfeed.tech/sources/andrew-lock-net-escapades.md>)

Topics: [native aot](<https://devfeed.tech/topics/native-aot.md>), [trimming](<https://devfeed.tech/topics/trimming.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [.NET](<https://devfeed.tech/topics/net.md>), [linker](<https://devfeed.tech/topics/linker.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [azure](<https://devfeed.tech/tags/azure.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [core](<https://devfeed.tech/tags/core.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [guide](<https://devfeed.tech/tags/guide.md>), [linker](<https://devfeed.tech/tags/linker.md>), [nativeaot](<https://devfeed.tech/tags/nativeaot.md>), [net-core](<https://devfeed.tech/tags/net-core.md>), [net-core-observability](<https://devfeed.tech/tags/net-core-observability.md>), [net-sdk](<https://devfeed.tech/tags/net-sdk.md>), [observability](<https://devfeed.tech/tags/observability.md>)

### AI overview

The article explains how linker substitutions in a .NET NativeAOT application can replace a runtime property check with a compile-time constant, allowing additional dead-code elimination and removal of unused dependencies. In the described case, the change reduced the binary size by 22-25%.

### Source excerpt

In this post I describe how to perform method-substitutions with the NativeAOT linker to remove additional dependencies that the linker couldn't see were unused

## Finding the total number of processors on a machine with .NET

DevFeed: [Finding the total number of processors on a machine with .NET](<https://devfeed.tech/articles/finding-the-total-number-of-processors-on-a-machine-with-net-51480.md>)

Original publisher: [Read original article](<https://andrewlock.net/finding-the-total-number-of-processors-on-a-machine-with-dotnet/>)

Author: Andrew Lock

Published: 2026-08-25T10:00:00Z

Content type: tutorial

Language: en

Sources: [Andrew Lock | .NET Escapades](<https://devfeed.tech/sources/andrew-lock-net-escapades.md>)

Topics: [.NET](<https://devfeed.tech/topics/net.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [.NET Framework](<https://devfeed.tech/topics/net-framework.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [linux](<https://devfeed.tech/tags/linux.md>), [macos](<https://devfeed.tech/tags/macos.md>), [net](<https://devfeed.tech/tags/net.md>), [net-core](<https://devfeed.tech/tags/net-core.md>), [net-core-observability](<https://devfeed.tech/tags/net-core-observability.md>), [net-framework](<https://devfeed.tech/tags/net-framework.md>), [observability](<https://devfeed.tech/tags/observability.md>)

### AI overview

This post explains how to retrieve the total number of logical processors on a host machine in .NET, rather than only the processors available to the current process. It compares behavior across .NET Framework and modern .NET, then describes using native APIs on Windows and macOS and parsing files on Linux.

### Source excerpt

In this post I show how to find the total number of logical CPUs on a host (not just those available to a process); something that isn't exposed in modern .NET