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,

Set GenerateDefaultValueIncode to false.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -