# trimming

A .NET publishing optimization that removes unused code from self-contained applications to reduce deployment size.

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

## Test what you ship: MSTest and Native AOT

DevFeed: [Test what you ship: MSTest and Native AOT](<https://devfeed.tech/articles/test-what-you-ship-mstest-and-native-aot-2952.md>)

Original publisher: [Read original article](<https://devblogs.microsoft.com/dotnet/mstest-source-generation/>)

Author: Amaury Levé

Published: 2026-09-03T18:00:00Z

Content type: article

Language: en

Sources: [.NET Blog](<https://devfeed.tech/sources/net-blog.md>)

Topics: [native aot](<https://devfeed.tech/topics/native-aot.md>), [trimming](<https://devfeed.tech/topics/trimming.md>), [.NET](<https://devfeed.tech/topics/net.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>)

Tags: [deployment](<https://devfeed.tech/tags/deployment.md>), [generation](<https://devfeed.tech/tags/generation.md>), [mstest](<https://devfeed.tech/tags/mstest.md>), [native-aot](<https://devfeed.tech/tags/native-aot.md>), [net](<https://devfeed.tech/tags/net.md>), [source-generators](<https://devfeed.tech/tags/source-generators.md>), [testing](<https://devfeed.tech/tags/testing.md>), [trimming](<https://devfeed.tech/tags/trimming.md>)

### AI overview

MSTest 4.4 uses source generation to let test projects run as Native AOT executables, helping teams test under the same trimming and deployment constraints as their applications. The article explains that this can reveal application issues such as reflection-dependent serialization that managed test runs may miss.

### Source excerpt

MSTest source generation lets test projects use the same Native AOT and trimming deployment model as the applications they validate, while reducing reflection on the test execution path. The post Test what you ship: MSTest and Native AOT appeared first on .NET Blog.

## How Does Dotnet Publish Work

DevFeed: [How Does Dotnet Publish Work](<https://devfeed.tech/articles/how-does-dotnet-publish-work-4525.md>)

Original publisher: [Read original article](<https://feeds.feedblitz.com/~/923705738/0/baeldung/ops~How-Does-Dotnet-Publish-Work>)

Author: John Caleb

Published: 2025-08-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Baeldung - Ops](<https://devfeed.tech/sources/baeldung-ops.md>)

Topics: [Deployment](<https://devfeed.tech/topics/deployment.md>), [.NET](<https://devfeed.tech/topics/net.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [NuGet](<https://devfeed.tech/topics/nuget.md>), [trimming](<https://devfeed.tech/topics/trimming.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [applications](<https://devfeed.tech/tags/applications.md>), [build](<https://devfeed.tech/tags/build.md>), [cli](<https://devfeed.tech/tags/cli.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [deployment-tools](<https://devfeed.tech/tags/deployment-tools.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [net](<https://devfeed.tech/tags/net.md>), [nuget](<https://devfeed.tech/tags/nuget.md>), [publication](<https://devfeed.tech/tags/publication.md>), [trimming](<https://devfeed.tech/tags/trimming.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains how the .NET dotnet publish command prepares applications for distribution by building the project, resolving dependencies, and producing deployable files. It covers deployment targets, common publishing options, framework-dependent and self-contained deployments, and optimizations such as trimming and single-file publishing.

### Source excerpt

Explore what dotnet publish does, how it works behind the scenes, and how to use it efficiently in various deployment circumstances. Related Stories Configuring Environment Variables in Ansible Introduction to GoCD Using a Package Manager in GitHub Actions