Why aren't .NET “application settings” stored in the registry?

前端 未结 17 1808
醉话见心
醉话见心 2020-12-13 14:51

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 us

17条回答
  •  不知归路
    2020-12-13 15:00

    It's because the registry is an ugly nightmare to use, and people didn't like it. It also didn't support xcopy deployment. With the use of xml files for configuration, you can move an app from machine to machine without the need of an installer. This was one of the biggest complaints with writing code back in the 90s.

    With the registry, you have to grant someone permission to modify it when you install the application which in many organizations is forbidden. To modify the setting for an application you also have to know where to look in the registry which is difficult at best in many instances. With the config file, it's right there segregated from most other apps. Typically all the settings you need are right there for easy view and modification.

提交回复
热议问题