C# How do published app use settings I changed in the app.config?

Asked

Viewed 54 times

0

I have an app like Netframework Console, and I have the app.config in it.

My app needs to use the tags from app config. that I change frequently to generate some text files, that is to say I have information that is dynamic there.. but in debug mode when I change the app.config information it recognizes and generates the files normally. When the app is published it considers the app.config information so "Frozen"

How to make my published app consider App.CONFIG with this dynamic data?

  • 1

    If you need dynamic variables you might want to think of another strategy, like storing this information in a database or other text file, like a json for example. Your application will only read the app.config at startup, so every time you change some value you will have to restart the application, so the change will have some effect.

  • Present the code of how you are changing and recovering these variables from the app.config

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.