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

前端 未结 17 1804
醉话见心
醉话见心 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条回答
  •  猫巷女王i
    2020-12-13 15:03

    I dont think this is a question of being platform independant. Many applications have been developped in the past on Linux, Mac and Windows, some using config files and others the registry.

    I think the main reason comes from the "COM experience". The whole principle was to have component objects registered centrally in the registry so that any application could use it without having to copy the dll. This rapidly lead us to versionning problems. Multiple applications could hardly use different versions of a same component.

    With configurations in the registry you have the same problem. Having two versions of a same application can be a real problem if the development was not done right. We had this kind of problems using multiple versions of Oracle a long time ago.

    With .Net and the exploding capacity of hard drives and bandwidth, file duplication is no longer a concern. Having the dependencies copied in your folder project greatly simplifies application deployment. The same applies to configurations files. You can host multiple copies/versions of the same application without having problems with the limited machine/user architecture of the Registry.

提交回复
热议问题