Questions tagged [user.config]
38 questions
23
votes
5 answers
c# error:Unrecognized configuration section userSettings - stop program reading user.config?
In my c# form application (created in VS2010, using .NET 4.0) I use an application setting to store an output path.
Previously this setting was configured with a user scope, but I had to change its scope to application.
After doing this I now get an…

dancypants
- 473
- 1
- 4
- 7
22
votes
2 answers
How to save user.config to AppData\Roaming folder instead of AppData\Local?
Introductory Example
This code
Properties.Settings.Default.MyUserSettingBlah = "some new value";
Properties.Settings.Default.Save();
saves the user.config file…

Lernkurve
- 20,203
- 28
- 86
- 118
9
votes
2 answers
How to get hash value in user.config path?
I have installed .NET application. Its config location is
%AppData%\[CompanyName]\[ExeName]_Url_[hash]\[version]\user.config.
I need to get [hash] value from another application.
According with MSDN, user.config path template is
[c:\Documents…

user3821449
- 91
- 1
- 2
8
votes
1 answer
How do I encrypt user.settings
I'm developing a windows desktop application with C# .NET4.0 VS2010 on Windows 8.1. I've a range of settings that I store using the .NET settings mechanism. These have user scope so, when set within the application they are written to…

ifinlay
- 621
- 1
- 7
- 24
4
votes
2 answers
Delete Previous Version User Settings Config File & Directory After Upgrade C#
I have a C# application that store users settings in the standard user.config file.
This is obviously located in a directory named as the version number of the application i.e.
My_App/1.0.0.0/user.config
Having successfully upgraded to a new version…

1cm69
- 177
- 2
- 16
4
votes
3 answers
c# Unit Test: Writing to Settings in unit test does not save values in user.config
I am running a c# unit test (VS 2008). Within the test I do write to the settings, which should result in saving the data to the user.config.
Settings.Default.X = "History"; // X is string
Settings.Default.Save();
But this simply does not create…

HorstWalter
- 115
- 6
3
votes
0 answers
Load user settings from file system
Is there a way to load a user.config file from an arbitrary location in the file system and refresh the content during run-time? I need to switch between different configuration files during run-time, but while the saving to any location works:…

user2425081
- 51
- 3
3
votes
0 answers
ClickOnce and managing connection strings
Our application uses ClickOnce for admin-less deployment by the user to their computer.
The app has a SqlServerCE database that contains sensitive data. A requirement is that the db password be changed at deployment and every 20 days afterwards…

shawn
- 31
- 1
2
votes
1 answer
remove user.config during uninstall in a MSI admin install/uninstall using Group Policy object (GPO)
We have a user.config file that is created in C:\Users\ [User] \AppData\Local[Company][Project Name].vshos_Url_zw3i045fzlcuakzzn3dtaw3fqgh03sub\1.0.0.0\ directory and would like to remove the user.config file so that we can leave the clients…

Jignesh
- 136
- 2
- 9
2
votes
1 answer
.NET 5.0 Single File Publish user.config issue
I'm trying to migrate WPF project from .NET Core 3.1 to .NET 5.0.
My project uses default properties file (user.config) to store some app data.
Project code:
///
/// Interaction logic for MainWindow.xaml
///
…

Sindeev Victor
- 31
- 3
2
votes
2 answers
"Configuration system failed to initialize" when getting values from Settings.settings
Too much frustrated with this problem... :-(
Winforms, C# 2.0, VS 2010
While developing, I just try to access to a setting value in Settings.setting file. For example:
string foo = MyProject.Properties.Settings.Default.InstallerLogFile_Path
As…

HiseaSaw
- 165
- 1
- 1
- 11
2
votes
1 answer
VB.net Serialization Issue
I'm trying to save the following class to the user.config and I'm not sure what I'm doing wrong. Is the dictionary object not allowing the class to be serialized?
Public Class RunInformation
Public ExecutablePath As String
…

chancity
- 31
- 2
2
votes
1 answer
Autocreate user.config file in deployed app
I'm coding a VB.Net AddIn for outlook (hence its VBA with .NET). It's an addition to the standard Calender Item screen. Everything's going fine. But i have a third form with two textboxes, that show me the filepath of the running assembly and the…

Christian Hase
- 31
- 5
2
votes
1 answer
If there are Int32[] properties in user.config, I get an invalid cast exception when I use my CustomSettingsProvider
I followed this article and I created my CustomSettingsProvider in order to get rid of the "_url_somehash" part of the path where the user.config file is stored. Now my settings are stored in…

Angelo Mascaro
- 129
- 8
2
votes
3 answers
Split user.config into different files for faster saving (at runtime)
In my c# Windows Forms application (.net 3.5 / VS 2008) I have 3 settings files resulting in one user.config file.
One setting file consists of larger data, but is rarely changed. The frequently changed data are very few. However, since the saving…

HorstWalter
- 115
- 6