.net – Why aren’t .NET “application settings” stored in the registry

application-settingsnetregistry

Some time back in the nineties, Microsoft introduced the Windows Registry. Applications could store settings in different hives. There were hives for application-wide and user-specific scopes, and these were placed in appropriate locations, so that roaming profiles worked correctly.

In .NET 2.0 and up, we have this thing called Application Settings. Applications can use them to store settings in XML files, app.exe.config and user.config. These are for application-wide and user-specific scopes, and these are placed in appropriate locations, so that roaming profiles work correctly.

Sound familiar? What is the reason that these Application Settings are backed by XML files, instead of simply using the registry? Isn't this exactly what the registry was intended for?

The only reason I can think of is that the registry is Windows-specific, and .NET tries to be platform-independent. Was this a (or the) reason, or are there other considerations that I'm overlooking?

Best Answer

Taking a dependency on the registry prevents XCOPY Deployment.