views:

51

answers:

1

I have created a custom settings provider to store my application settings in a separate XML file. I've created settings and values through Visual studio (Solution -> My Project -> Settings) and specified my custom provider.

It doesn't seem to be 'used' by the application. I can put breakpoints everywhere in my custom provider, but they are not touched... Am I missing something here? How do I use my custom settings provider?

  1. Create the provider
  2. Enter settings + reference to custom provider in VS
  3. ?
A: 

Take a look at this tutorial. It sounds like this is what you're trying to do.

It's for Winforms, and I'm not sure how it translates, but make sure you are actually setting each different setting to use the custom provider. In Winforms, this is done as a Provider property on each of the settings.

Daniel Rasmussen
Lol i'm using that one, however i can't get it to work... The provider somehow isn't being picked up.
Ropstah
You're using the same tutorial? I've got to warn you not to use exceptions like in the tutorial, though. Better to check for a `null` node on return instead.
Daniel Rasmussen