tags:

views:

177

answers:

0

I have a dll that accesses a database and reads the connection string from an application setting stored in the config file. The application that references this dll will then need to set the value for this config setting in its config file.

The problem I'm having is that the generated config code automatically uses my dev connection string as the default value via the DefaultSettingValueAttribute. Then when an application references my dll it works without creating an entry in its own config file because it is using the default value. This bug wasn't caught until deployment time when the dev connection string was no longer valid.

Is there a way to use the designer for the application settings but turn off the creation of the DefaultSettingValueAttribute so that there is no default value and applications are forced to provide a value in the config?