1

I have a .NET class library that needs configuration parameters, their values are different for every deployment. I would normally store these in an app.config.

The question is similar to this one, however the entry point is not a .NET application: it's a C# class library that gets called by a C++/CLI wrapper that exports C functions, which get called by a native application.

Shoud I just read a configuration file manually or is there a more elegant way?

Community
  • 1
  • 1
Alex
  • 7,728
  • 3
  • 35
  • 62

2 Answers2

1

I found out that it doesn't matter whether the running application is a .NET application or not: the runtime tries to load ProcessName.exe.config anyway and I can put (or link to) my configuration there.

Alex
  • 7,728
  • 3
  • 35
  • 62
0

You can use a settings file. Read more at http://msdn.microsoft.com/en-us/library/aa730869(v=vs.80).aspx#settingscs_topic3

Bogdan Verbenets
  • 25,686
  • 13
  • 66
  • 119