I've found a change in SP1 that doesn't seem to make sense to me, but seems
to be there nonetheless.
The situation is this... I have an application that stores it's
configuration in a file in the Application directory. If the application
is called "MyApp.exe", the configuration file is "MyApp.config". Note that
this is not the same as "MyApp.exe.config" which is where the .NET-based
XML-format configuration normally goes. This configuration file, the
MyApp.config, is encrypted binary data - not XML data as would go in the
MyApp.exe.config.
Well... I built my application in VS2008 SP1, now all of a sudden I start
getting error messages saying "Configuration system failed to initialize"
with the error essentially coming from the constructor of a TCPSocket.
After a bit of testing, I've come to the conclusion that when built in
VS2008 SP1, the application first attempts to look for MyApp.exe.config,
and if it doesn't find it, will then try to look for MyApp.config. In my
case, it finds the second file, and tries to load it as XML, which
obviously fails.
I determined this with several bits of evidence:
1. A previous version of the EXACT same code that was compiled pre-SP1 had
no problems executing
2. I used FileMon and DebugView from SysInternals to see the details of
what files were being accessed and when
3. The kicker came when I decided to create an essentially empty
MyApp.exe.config file (just an XML header and an empty 'configuration'
section). After creating this file, voila! Everything now works, no
complaints... No changes to the binary code necessary.
BUT... it doesn't make sense to me, because the code that is loading the
configuration file should be part of the Framework, which HASN'T changed on
my test box... it doesn't make sense to me that a change in the
development environment, and a recompile of the APPLICATION binaries would
cause this type of change... it should only be if the Framework changed
that I would expect to see this...
Can anyone confirm that this change has indeed occurred in VS2008 SP1, and
if so, why does it affect my unchanged test machine??
-mdb