visual studio - Turn Off DefaultSettingValueAttribute Create on Applicaiton Settings for .Net Application -
I have a DLL that accesses a database and reads the connection string from an application setting stored in the config file. An application that refers to this DLL will need to set the value of this configuration setting in its config file.
The problem I have is that the generated config code automatically uses my Dev Connection string by default as the value through DefaultSettingValueAttribute
. Then when an app refers to my DLL, it works without creating an entry in its own config file because it is using the default value.
Is there a way to use a designer for app settings, but DefaultSettingValueAttribute
so that there is no default value and the application is forced to provide a value in config ? Select the entry that you want to remove the default value, and in the Properties window,
Comments
Post a Comment