I am using the type expression:
type dbSchema = SqlDataConnection<ConnectionStringName="X1", ConfigFile="App.config">
This works great at compile time (I have full access to all the db types), but it fails at run time. I presume it's because the config file generated in the console application's bin
directory is named something else, such as MyAppName.exe.config
, and therefore the App.config
file is not found.
Certainly, for an ASP.NET MVC type app that uses web.config
, there's no issue because the compile and runtime config filenames are the same.
Fortunately, placing a duplicate App.config
in the bin
directory does remediate the problem, but is that what we are expected to do? Any thoughts?