2

I'm developing an Add In for Outlook (2007 and 2010) using .NET4 to be deployed within a company. I've been using App configs to store user and system configuration, but I've been told by the IT guys that registry entries are preferred over App config (as they are easier to manage and update, compared to a .dll.config file on many machines as part of the deployment and future maintenance).

From my digging around the web it seems like everyone prefers app.config, unless you want to make it harder for your user to find your settings deep underneath registry entries and make them obscure. What does the community think?

Reza S
  • 9,480
  • 3
  • 54
  • 84

2 Answers2

3

In my opinion, if these are configuration settings that will need to be changed at one time or another, or configured initially, I think it should be a resounding app.config choice.

But if there is some behind-the-scenes persistent data that an application relies on and nobody (sys admins, end users) will ever have to touch then it could go either way.

And if there is some behind-the-scenes persistent data that never changes and you want to make it even harder to tweak, add it to the registry.

You can set permissions on both, whether it registry permissions for NTFS permissions. So security shouldn't be a deciding factor. I would say, it's however close you want the configuration data to be to the users' eyes.

Also, the app.config is much easier to work with given the System.Configuration namespace.

0

I have always been using the registry for values that need to be set during install. One important reason is that the MSI install mechanism provides ways to update the registry during installation in an easy manner. It is possible to update the app.config file during an installation, but you need a custom action when doing it. I prefer the easiest, most standardized way to perform an installation. I don't want to create custom actions unless it is absolutely necessary. So I prefer the registry.