Anyone noticed that AOT publishing in C# is not compatible with Settings.settings file? #7579
Replies: 1 comment 1 reply
-
It looks like you're getting relevant help at https://stackoverflow.com/questions/77244170/anyone-can-use-settings-settings-file-in-c-sharp-aot for the same question you asked there. This discussion would belong at https://github.com/dotnet/runtime rather than in the C# language design repository where we currently are. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I found you can use
Properties.Settings.Default.My_Key
to get the value of My_Key in Settings.settings.
but when you use
Properties.Settings.Default.My_Key = "abc"
to set the value, the program will close with an error "can't find My_Key".
This issue only occurs during AOT publishing, and there is no similar problem with JIT publishing.
I don't know how to save the user setting now. =(
Beta Was this translation helpful? Give feedback.
All reactions