Avoid loading ConfigurationManager on .NET 6 (#7703)
Avoid loading ConfigurationManager on .NET 6 (#7703)

After we updated System.Configuration.ConfigurationManager to 6.0, it
broke some API consumers that use MSBuildLocator because they deploy the
old ConfigurationManager.dll, which prevents loading the new one even
from the SDK directory. This mitigates the problem by avoiding JITing a
method that needs ConfigurationManager types on codepaths that won't use
it (by moving the calls into a separate method).
sean-gilliam/msbuild,AndyGerlicher/msbuild,AndyGerlicher/msbuild,rainersigwald/msbuild,rainersigwald/msbuild,sean-gilliam/msbuild,rainersigwald/msbuild,AndyGerlicher/msbuild,sean-gilliam/msbuild,sean-gilliam/msbuild,AndyGerlicher/msbuild,rainersigwald/msbuild