I am tired of googling about how to use user.config instead of app.config in a managed C++ application. All I found was about C# and I can't figurate out how to translate to C++ (Properties namespace does not exist)
Anybody can put me in the way to learn about that? I need to know how to create, read and write a user.config file.
Thank you
Follow this steps and it will work like desired:
1 - Add a reference to
System.Configuration2 -
Add New Item>Visual C++>Utility>Configuration file3 - Open
app.configand add your settings for example:4 - Copy the
app.configto the output folder in the post build event: gotoProject Properties>Configuration Properties>Build Events>Post-Build Events>Command Lineand add this:5 - Read your settings:
Here's an AppConfigDemo project in
C++/CLI.