Adding dynamic properties to a console app

  • Thread starter Thread starter listerofsmeg
  • Start date Start date
L

listerofsmeg

Newbie here.

I want to use a .config file with my simple console app, but no matter
what I do I cannot get the "dynamic" rollout in my properties window.

In the end I gave up and coded the calls to
ConfigurationSettings.AppSettings.Get() myself, but my problem now is
creating the config file. It looks like I'll have to do that manually
too.

Am I missing something fundamental? I tried creating a windows app,
but couldn't get "dynamic" in that either, except for controls that I
dragged onto the form.

Thanks,
Lister
 
Sijin Joseph said:
By default the VS.Net IDE only shows the dynamic rollout for some
controls and components that are designed visually. For any other
dynamic properties you will have to code it yourself using
ConfigurationSettings as you have. The config file will also have to be
written manually. This links shows you some examples of how it is done

http://msdn.microsoft.com/library/e...iontoapplicationsettingstorage.asp?frame=true

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Thanks, it is as I feared.
I now have it working, but for the record I had to add a config file
to the project using "Add->Add New Item". Before doing this I created
the config file manually in the debug folder, but when I built the
app, VS.Net always deleted it!!!!!

I was also unsure whether the config XPath would have to be set up in
the app somehow, but it appears to default to
configuration.appSettings.
(Note the case, I struggled for ages because I pus a capital A in
appSettings)

Cheers,
Lister
 
Back
Top