UnoptimizedAssemblyDetector 0.1.1

Requires NuGet 4.0 or higher.

dotnet add package UnoptimizedAssemblyDetector --version 0.1.1
NuGet\Install-Package UnoptimizedAssemblyDetector -Version 0.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UnoptimizedAssemblyDetector" Version="0.1.1">
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UnoptimizedAssemblyDetector --version 0.1.1
#r "nuget: UnoptimizedAssemblyDetector, 0.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install UnoptimizedAssemblyDetector as a Cake Addin
#addin nuget:?package=UnoptimizedAssemblyDetector&version=0.1.1

// Install UnoptimizedAssemblyDetector as a Cake Tool
#tool nuget:?package=UnoptimizedAssemblyDetector&version=0.1.1

Unoptimized Assembly Detector

build NuGet

NuGet package that detects when assemblies compiled without the -optimized flag are added to a project and warns you about it.

How does it work?

This project hooks into the build process and detects if any referenced assembly was compiled in Debug mode.

UnoptimizedAssemblyDetector in action

Add to your project:

  <PackageReference Include="UnoptimizedAssemblyDetector" Version="0.1.1" PrivateAssets="All" />


It's surprising to many that dotnet publish and dotnet pack compile assemblies in debug mode. This means that unless you've specified -c release, you're building .NET assemblies without the -optimize compiler flag.

With this package, you can get warned if one of your dependencies is being built in Debug mode and published to It can warn any referened assembly, not only added through NuGet.

Now that you know about it, you can communicate to the author of the dependency. Wait until a fix is shipped, you can ignore the warning for said package, roll back to an older version or chose another dependency.


There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on UnoptimizedAssemblyDetector:

Repository Stars
High performance LINQ implementation with minimal heap allocations. Supports enumerables, async enumerables, arrays and Span<T>.
Sentry SDK for .NET
Check out NuGet packages adoption and what's trending on NuGet.
Version Downloads Last updated
0.1.1 60,622 5/25/2021
0.1.0 1,326 5/22/2021
0.0.5 420 5/21/2021
0.0.4 290 5/20/2021
0.0.3 328 5/20/2021
0.0.2 394 5/20/2021

Changes since version 0.1.0

- No documented changes.
Changes since version 0.0.5

- Description to nuget package
- Gif to readme showing how it works
Changes since version 0.0.4

- Fixed conflict with Microsoft.Build.Utilities.Core
- Added a logo to nuget package and acknowledgment to readme
- CI and release to nuget with craft CLI
Changes since version 0.0.3

- Works also on Visual Studio (.NET Framework msbuild)
- Initial release
     See full changelog at