The best way to get a path to machine.config of a different .NET version
Whats the best way to get a path to .net 2.0 machine.config file, if the application is running on .net 4.0? One way would be to do string manipulation and file system access to replace v4.0* with v2.0* in new ConfigurationFileMap().MachineConfigFilename; and then pass it to ConfigurationManager.OpenMappedMachineConfiguration(new ConfigurationFileMap(<HERE>)) . I will resort to this solution if nothing better is available. Since I needed the path to machine.config for ASP.NET versions, I didn't care about all .NET framework paths (e.g. 3 and 3.5 frameworks since they are just extensions of 2.0