Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings file is not created #8

Open
FloxRoxX opened this issue Mar 2, 2023 · 2 comments
Open

Settings file is not created #8

FloxRoxX opened this issue Mar 2, 2023 · 2 comments

Comments

@FloxRoxX
Copy link

FloxRoxX commented Mar 2, 2023

Hi,
i tried to use your nuGet pakage.
Iam on Visual Studio 2019 with a Windows Forms App on .NET 4.5.

I added
PortableJsonSettingsProvider.SettingsFileName = "settings.config";
PortableJsonSettingsProvider.ApplyProvider(Properties.Settings.Default);

to my Main() class, created 3 settings and tried to change them via code. I noticed that the settings.config file will not be created in the applications folder.
Conclusion it cannot be used to change the settings in the app folder...
I dont get any errors... it just wont work...

I tried both, your XML classic version and the new json version... nothing works

Any help would be appreciated :)

@milos12345
Copy link

I am just a user, but have you tried
PortableJsonSettingsProvider.SettingsDirectory = YOUR_SETTING_FOLDER;
and did you
Properties.Settings.Default.Save();
after changing settings?

@FloxRoxX
Copy link
Author

FloxRoxX commented Mar 3, 2023

I am just a user, but have you tried PortableJsonSettingsProvider.SettingsDirectory = YOUR_SETTING_FOLDER; and did you Properties.Settings.Default.Save(); after changing settings?

Hello Milo,
sorry for the late reply i was out for work yesterday.
Both settings in combination seems to do the trick...
However in earlyer versions we did not need the PortableJsonSettingsProvider.SettingsDirectory.
Good to know that we need it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants