MSDN > 論壇首頁 > Visual Studio Extensibility > App.config for VSPackage does not return any value for any key! ( VS SDK 2005 C#)
發問發問
 

已答覆App.config for VSPackage does not return any value for any key! ( VS SDK 2005 C#)

  • 2009年6月30日 上午 08:15Nayna 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hi,

    I am developing a VSPackage in VS 2005 using C# language.

    Is it possible to have a config file for a VSPackage?

    I have added a config file to my package and the appsettings["key"] always has no value, though there are few key value pairs defined in the app.config file.

    This VSPacakge is of the form class library. so is it possible to  have app.config file for VSPackage? If yes, can anyone help me with a code snippet of how to use it?

    Thanks,
    Nayana

解答

  • 2009年7月2日 上午 06:56Nancy ShaoMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    Hi Nayana,

    As far as I know, Config file is not used to save configuration information in VSPackage. It usually locate state information in System Registry or application data folder for the current user which the Package class provides support for.

    For more information, please see the following article:

    If I misunderstood you, or you have any questions, please let me know.

    Best Regards,
    Nancy


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

所有回覆

  • 2009年7月2日 上午 06:56Nancy ShaoMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    Hi Nayana,

    As far as I know, Config file is not used to save configuration information in VSPackage. It usually locate state information in System Registry or application data folder for the current user which the Package class provides support for.

    For more information, please see the following article:

    If I misunderstood you, or you have any questions, please let me know.

    Best Regards,
    Nancy


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.