How do I disable reading the app.config file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jasonburton
    New Member
    • Nov 2009
    • 1

    #1

    How do I disable reading the app.config file?

    I have an application that has been ported over the years through multiple development environments and has tens of thousands of customer installs. Currently, I'm trying to port from it Visual Studio 2003 to VS 2008.

    My program has historically read a file called <executable name>.config with an application-specific format and use, but now VS 2008 creates a ConfigurationMa nager object that tries to read this same file as an XML file. When it tries to read this file, I receive a 'Configuration system failed to initialize' error because my .config file is not an XML file.

    Can I disable this function of the ConfigurationMa nager? Because of the tens of thousands of installs, it is not feasible to change the filename that my application is expecting. It seems like maybe the System.Configur arion.Configura tion.AllowExeDe finition.Machin eOnly member is meant for this purpose, but I can't figure out how to use it. Any ideas?

    Thanks,
    Jason
    Last edited by jasonburton; Nov 30 '09, 10:16 PM. Reason: Improved clarity of question
Working...