If Project C references Project B, and Project B depends on System.Configuration.ConfigurationManager , the build system must resolve which DLL to use. If a third-party library used by Project B was compiled against Version=4.0.1.0 , but your project pulls in a newer version (like 6.0.0), you may encounter a FileNotFoundException or a FileLoadException at runtime.
Console.WriteLine($"Running in environment with max retries: maxRetry"); system.configuration.configurationmanager version 4.0.1.0
: Specialized XML nodes defined by developers for complex configurations. The Significance of Version 4.0.1.0 If Project C references Project B, and Project
| Feature | 4.0.1.0 | 6.0.0 (latest) | |---------|---------|----------------| | .NET Framework support | 4.6.1+ | 4.6.2+ | | .NET Core 2.x | Yes | No (deprecated) | | .NET 6/7/8/9 | Works but not optimized | Fully optimized | | ConfigurationBuilder integration | No | Yes | | GetSection for generic types | No | Yes | | OpenExeConfiguration level control | Basic | Full | The Significance of Version 4
Ensure your app.config contains a redirect that maps the old requested version (4.0.1.0) to the version you actually have installed.
This is the biggest issue. Modern .NET uses IConfiguration (JSON, environment variables, secrets.json, etc.). Using ConfigurationManager means you are opting out of dependency injection-friendly config. You cannot easily mock or replace ConfigurationManager in unit tests without a wrapper.