4

I'm using python.Net in my project to include a c# dll which depends on app.config. My python project obviously does not define an app.config, so before I add a reference to the dll I set the config file as follows.

System.AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "myfile.config")

This works when built on Windows. But on Linux using Mono, when the dll attempts to load the configuration file via

System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile

ConfigurationFile will be empty.

In my googling the only reference I found was this unresolved ticket https://bugzilla.xamarin.com/show_bug.cgi?id=15741

I have also tried moving the setting of APP_CONFIG_FILE inside of my dll to no avail.

Ed Campion
  • 196
  • 8

0 Answers0