It's too early to read `Configuration` in Directory.Build.props without a workaround to set it manually to `Debug` when not set. I think it's best to avoid reading the properly that early altogether. See also https://github.com/dotnet/msbuild/issues/12792