🧩 Using C# Preprocessor Directives For Conditional Compiling

Let’s discuss how we can have a dev-friendly environment-dependent compilation process in C#!

Mina PĂŞcheux
CodeX
Published in
7 min readJan 13, 2023

--

Let’s say you’re working on a big project with lots of other devs, and you have a professional delivery system with tests, staging and releases. All of these “versions” of your product probably run in different environments, with their own set of env variables and symbols — for example, you surely have a “dev database” and a “prod database” that require different login and…

--

--

Mina PĂŞcheux
CodeX
Writer for

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)