.NET 2.0 AppSettings Caching Problem

  • Thread starter Thread starter rory
  • Start date Start date
R

rory

Have the following setting in my app.config:

<setting name="Scenes" serializeAs="Xml">
<value>
<ArrayOfString
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>State
Img;c:\scenes\Scene1\;5000;1;0;0;0;3</string>
<string>Local
Img;c:\scenes\Scene2\;5000;1;0;0;0;1</string>

<string>Satellite;c:\scenes\Scene3\;5000;4;2000;300;1000;5</string>
</ArrayOfString>
</value>
</setting>

The setting is read into a String array, which is then used in the
processing.

PROBLEM:
--------------------
CHANGING THE VALUES inside <string></string> does not change the
run-time behavior. I usually have to restart VS.2005 or restart my
computer for the changes to be recognized. I have tried both changing
through the Settings tab of the Project Configuration and directly in
the app.config. Other, single-value app setting changes take effect
immediately, it is only this serialized XML array that does not get
picked up.

This problem also affects OTHER MACHINES where the application is
deployed. When I recompile a new EXE and deploy it along with the
exe.config, the setting does not change at run-time. .NET 2.0 is using
a config setting that is SEVERAL DAYS OLD!

My conclusion is that the Framework is caching serialized settings.
Does anyone have any suggestions for invalidating the cache when
app.settings changes are made???
 
Hi,

In the project settings in the settings tab click on the synchronize
button (next to view code)

Ken
 
Back
Top