Expose my.settings outside of project / namespace

Posted on 2007-08-08
Last Modified: 2012-05-05
Does anyone know of an efficient way to expose the my.settings outside of the current project?

I ask because ideally, I would like to create project called Environment, that would hold and manage all my user preferences. Since VB.NET has such a nice method for saving settings (my.settings) I would prefer to save it there. But, my other components in different projects (all under the common solution) would need access to those settings. I know that I can create properties in my projects to explicitly pass the values, but that seems sloppy since my number of settings may grow in the future.

I guess I am asking if there is a way to do something like:


Question by:IOFDSYS
    1 Comment
    LVL 6

    Accepted Solution

    You can't expose My.Settings directly, but you can create your own settings storage class (by inheriting from ApplicationSettingsBase).
    There's a sample on MSDN :

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now