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 for a WPF app goes into new folders for every publish of click-once #9195

Open
wallymathieu opened this issue Apr 24, 2024 · 6 comments

Comments

@wallymathieu
Copy link

wallymathieu commented Apr 24, 2024

Description

On each publish we get a new folder.

Reproduction Steps

Create a minimal WPF app in .net8, publish it as a clickonce to IIS and install from IIS.

Say that my App Data folder for the Company ${CompanyName} is:
C:\Users\${UserName}\AppData\Local\${CompanyName}
Then inside that folder we get new subfolders when saving user settings in the following format:

WpfApp1_Path_mhp42l3wrf1iq0iczitfpwjmqjuqowdp\data\${Version}
WpfApp1_Url_0hil1mzikc4mwep0qb23dmk11i23h1aj\data\${Version}
WpfApp1_Url_jmiaz0vxapsp3h0wc2fnpf4bopt0peau\data\${Version}

Expected behavior

The expected behaviour would be that the old settings are copied or read on startup.

Actual behavior

You do not get any of the old user settings.

Regression?

This is a regression. It works in .NET Framework. Perhaps it is related to how .net Framework clickonce applications store user data in a special folder.

Known Workarounds

Use https://github.com/Bluegrams/SettingsProviders

Configuration

.net 8
Windows

Other information

No response

@wallymathieu
Copy link
Author

This looks related to dotnet/runtime#31959

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-configuration
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov
See info in area-owners.md if you want to be subscribed.

@agocke agocke transferred this issue from dotnet/runtime Jun 3, 2024
@baronfel baronfel transferred this issue from dotnet/sdk Jun 3, 2024
@miloush
Copy link
Contributor

miloush commented Jun 3, 2024

Not quite convinced this is WPF business yet as settings are not part of the WPF codebase.

@wallymathieu are you calling Update()?

@wallymathieu
Copy link
Author

In ClickOnce for .net framework you don’t need to call update

@wallymathieu
Copy link
Author

Calling update does not work unfortunately. We tried that since we figured we did something wrong in our old WPF .net framework app, but in a .net WPF app, the update does not help us…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants