By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,457 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

Modify Windows Application "User Profile Settings" from a class library (user.config)

P: n/a
Hi everyone,

I have a common class library (call it common_library) that I
include/reference in my projects. In this class library, I would like to
have it save certain settings to the user.config for the application.
However, when I put in

Properties.Settings.Default["SOMEKEY"] = somevalue;

it kicks back an exception
(System.Configuration.SettingsPropertyNotFoundExce ption) that their is no
property in my common_library, when it should be trying to save the settings
in the application user settings. I've looked at ApplicationSettingsBase,
SettingsBase, Context, etc, but can't seem to figure it out. Since I can't
set it to the namespace of the application (it is a common library), I can't
tell it to use the application's "Properties.Settings..." setup. I can't
figure out how to pass the provider to the class library so that I can
manipulate it there, and then save it. Help?! :-)


Jan 5 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.