VB.NET App.config values resolving differently in production: machine.config inheritance or stale My.Settings defaults?
0 reputation · 11 Jul 2026, 03:48 UTC
0 reputation · 11 Jul 2026, 03:48 UTC
In a .NET Framework Visual Basic project, App.config is copied to [AssemblyName].exe.config at build time, and runtime reads go through ConfigurationManager (appSettings, connectionStrings) or the My.Settings proxy generated by the Project Designer. A value that resolves one way on a developer machine can resolve differently on a production server, and several overlapping configuration layers could account for the gap.
The exact precedence between a duplicate appSettings key in machine.config and the application's exe.config should be verified against current framework documentation before relying on either value.
Which layer should be diagnosed first when a VB.NET appSetting resolves differently on the server? When machine.config and the deployed exe.config define the same key, which value does ConfigurationManager.AppSettings return under .NET Framework 4.8? And does My.Settings fall back to its compiled default when the deployed config file is absent or outdated?
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.