---
title: "Discussion on \"Compile-time feature flags in C# using IL weaving and a Roslyn analyzer\" | Hashnode"
description: "Discussion on \"Compile-time feature flags in C# using IL weaving and a Roslyn analyzer\". Using AspectInjector to weave feature flag gates into .NET IL at compile time, with a Roslyn analyzer catching missing config at build time."
url: "https://hashnode.com/posts/compile-time-feature-flags-in-c-using-il-weaving-and-a-roslyn-analyzer/6a3ad11395340cd64b85a9cf"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Compile-time feature flags in C# using IL weaving and a Roslyn analyzer](https://chaotic-neutral-dev.hashnode.dev/compile-time-feature-flags-in-c-using-il-weaving-and-a-roslyn-analyzer?utm_source=hashnode&utm_medium=feed)

Using AspectInjector to weave feature flag gates into .NET IL at compile time, with a Roslyn analyzer catching missing config at build time.

Jun 23 · 9 min read · chaotic-neutral-dev.hashnode.dev  
Read the article

-   [#dotnet](https://hashnode.com/tag/dotnet)
-   [#c-sharp](https://hashnode.com/tag/c-sharp)
-   [#opensource](https://hashnode.com/tag/opensource)
-   [#architecture](https://hashnode.com/tag/architecture)

## Written by

[sptippett](https://hashnode.com/@chaoticstupiddev)

@chaoticstupiddev

  
[View profile](https://hashnode.com/@chaoticstupiddev)

Senior .NET dev. Codes at 3am. Fuelled by root beer. Chaotic good.

I'm a Senior Software Engineer and Technical Lead with 10+ years of experience who thinks feature flags shouldn't require an if statement, woodworking is just programming for wood, and root beer is an acceptable substitute for sleep. I build things in C#, Go, Python, and occasionally pine. I play D&amp;D, write Discord bots, learn languages, and ship OSS at 3am when I probably should be sleeping. Chaotic good. Pink is my colour. He/him/they/them

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
