In case anyone else runs into this problem, here is the workaround that I was able to use:
Create an xml file in the PublishProject
, and convert the data in the app.config
into individual xml tags like so:
<configuration>
<setting name="debug" serializeAs="String">
<value>False</value>
</setting>
</configuration>
becomes
<Properties>
<debug>True</debug>
</Properties>
Once you do this, you can call the following in your code, instead of using the value from the Settings.settings file.
XmlDocument doc = new XmlDocument();
String appPath = HttpContext.Current.Server.MapPath("~").ToString() + @"/App_Data/Properties.xml";
doc.Load(appPath);
debug = Convert.ToBoolean(doc.SelectSingleNode("Properties/debug").InnerText.ToString());
Note: that I put it in the App_Data folder of the finished project because that folder is not accessible via a browser by default.