1
Answer

app.config physical path to other config file

Jay Troy

Jay Troy

15y
15.1k
1
Hi all,
I am developing a c# .net console app and have this line in the app.config:

<connectionStrings configSource="App_Config\ConnectionStrings.config"/>

I created the App_Config folder both in the app root folder as well as debug folder, but I get a runtime error not finding the file:
"...configSource attribute must be a relative physical path"
trying to find the file from the drive root: c:\\App_Config...!

Is there a way to create token variables in app.config and reference them like: $(App_Config) and secondly make that a relative path of your app?

Appreciate any insight into this,

Kopel
Answers (1)