You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a .NET 4.8 application, I updated the packages Microsoft.Configuration.ConfigurationBuilders (Environment, Json, UserSecrets) from version 2.0 to 3.0. I have also updated my app.config file to reflect the latest version, shown here:
Before the update, when the version was 2.0. I was able to read the value from the secrets.xml file specified in the app.config key userSecretsFile:
var userKey = System.Configuration.ConfigurationManager.AppSettings["App:UserKey"];
After the update from version 2 to 3, this code no longer works and returns an empty string. I read the update guide but none of it provides troubleshooting guidance. I tried to update the path from ./App_Data/secrets.xml to ~/App_Data/secrets.xml for testing even then I get an empty string in the variable userKey.
Is there an additional step that needs to be performed in version 3 to make it work? Please suggest thanks
The text was updated successfully, but these errors were encountered:
I am working on a .NET 4.8 application, I updated the packages
Microsoft.Configuration.ConfigurationBuilders
(Environment, Json, UserSecrets) from version 2.0 to 3.0. I have also updated my app.config file to reflect the latest version, shown here:The structure of the secrets.xml file is given below:
Before the update, when the version was 2.0. I was able to read the value from the secrets.xml file specified in the app.config key userSecretsFile:
var userKey = System.Configuration.ConfigurationManager.AppSettings["App:UserKey"];
After the update from version 2 to 3, this code no longer works and returns an empty string. I read the update guide but none of it provides troubleshooting guidance. I tried to update the path from
./App_Data/secrets.xml
to~/App_Data/secrets.xml
for testing even then I get an empty string in the variable userKey.Is there an additional step that needs to be performed in version 3 to make it work? Please suggest thanks
The text was updated successfully, but these errors were encountered: