Using System.Configuration and app.config is Unity project

I’m porting an existing .NET application into a Unity project and it has a pretty large app.config file that I would like to use if I can. I realize there are a million ways to create a configuration file in Unity besides app.config but I would like to use it if I can. There is little on the internet about this subject but from what little I can gather it should work.

The application complies fine with the system.configuration dll and otherwise appears to work as expected. The issue is I can’t seem to get access to the app.config either at run time or development. If I add an app.config file to the project it of course is stomped out when I re-load and it is no longer part of the assembly. When I try to access the file in the directory it is not found and throws a null ref exception. I have tried putting the app.config file in every directory I could find but still no dice. Here is an example of my assignment…

string connectionString = ConfigurationManager.AppSettings[“AppName”].ToString();

Any thoughts or ideas?

Thanks…Brett

I would also like to know this. I don’t suppose you’ve found a solution have you?

Best regards,
Andy

Facing the same problem here - did any of you manage to solve it?

did anyone ever solve this ?

Apparently not :confused: