c# - How to ensure ConfigurationManager points to correct App.config -


recently created new class library project , added app.config file it. app.config file contains db connection string. current code

configurationmanager.connectionstrings["dbconnectionname"] gives me "null" .

but configurationmanager.connectionstrings[0] gives me result name "localsqlserver" . app.config not have entry this.

i don't see other config files in project . why happening ?

how ensure pointing correct app.config?

app.config , other config files read entry point of program. thus, if application, app.config file stored in windows application project read.

localsqlserver default sql server when no other connection string defined. reason why exists inside connectionstrings property.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -