locked
app.config file in metro style application RRS feed

  • Question

  • Hi,

    I am building a metro style application on windows 8.

    I wanted to add one application configuration file in the application where in I can store the settings related to wcf client, some more config settings.

    But when I right click I don't see the option to add the configuration file to metro style application. If I add it manually and try to run application it fails to load.

    Is this not supported in windows 8 metro style application or is there any other way to do the same.

    Thanks,

    Chandan


    Chandan Mahajan

    Tuesday, July 24, 2012 6:30 AM

Answers

  • (Sorry) this is not supported in metro apps. You can see supported functions on this thread.

    In our application we had to create the client on the fly. If the user has any initiative on the configurations, you can maybe include the settings in local settings.

    Good luck,


    Can Bilgin
    Blog CompuSight

    Tuesday, July 24, 2012 6:42 AM

All replies

  • (Sorry) this is not supported in metro apps. You can see supported functions on this thread.

    In our application we had to create the client on the fly. If the user has any initiative on the configurations, you can maybe include the settings in local settings.

    Good luck,


    Can Bilgin
    Blog CompuSight

    Tuesday, July 24, 2012 6:42 AM
  • Thanks for your reply.

    One question I have, in this case then where should we put the client binding for calling WCF services.

    generally we put such things in config files so that they can be changed without compiling the application.

    Is there any such configuration option available with metro style application which don't require compiling the whole code?

    Thanks,

    Chandan


    Chandan Mahajan

    Tuesday, July 24, 2012 12:18 PM
  • Hey Chandan,

    If you think your applications binding might be changing after the application is published, of the top of my head, you can create a (config) file in the LocalStorage. Then in case the application settings must be changed, the users will have read\write access to it through:

    C:\Users\<UserName>\AppData\Local\Packages\<ApplicationName>\LocalState\ (or \RoamingState\ if you want the application to use roamed data).


    Can Bilgin
    Blog CompuSight

    Tuesday, July 24, 2012 1:05 PM
  • If your question has been answered, please mark the appropriate post as answer so other community members with a similar question can find help faster.

    Can Bilgin
    Blog CompuSight

    Friday, July 27, 2012 10:31 AM