..NET always takes the config from the same directory as where the exe is
located.
But you can add a config file into your project.
In VB.NET it will be named app.config.
During build ... .NET will copy this file to the same directory as the EXE
and rename it as blabla.exe.config
Regards,
--
Nico Debeuckelaere
ND-Sign BVBA (Microsoft Certified Partner since 2004)
URL:
http://www.nd-sign.com
== ND-Sign, Designed for you ==
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
"jai hanuman" <(E-Mail Removed)> wrote in message
news:c2teaa$20fi5t$(E-Mail Removed)...
> hi,
> where can you set the "startup" directory for the config files? (like
> in the ini days). In those days, the project directory would be the
> startup and search path for the ini files.
>
> now however, i found that the myapp.exe.config does not get picked
> from the folder where myapp.csproj is. It seems to pick it up only
> from myapp/bin/debug (or release) folder (when in the IDE). When
> i copy the config file there, on every compile it cleans out the folder
> and deletes the config file.
>
> In the program i tried to set the AppDomainSetup.ConfigurationFile
> to two levels up, but it just ignores that change and the directory
> path after the call remains the same as before.
>
> Question: how do you get you program to read the config from the
> project root? I do not want a hack (post-build step) to copy the
> config to bin/debug.
>
> Thanks a lot.
>
>