This code works with Microsoft.Extensions.Configuration.UserSecrets 6.0.1. If I install Microsoft Graph 9.0.1, it does not work. There are no sections in the config
object. The secrets.json file is identical in both projects, is set to "copy if newer", and is successfully copied to the bin/debug folder.
var config = new ConfigurationBuilder()
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
.AddUserSecrets<MSGraphEmailTest>()
.Build();
If user secrets are still supported in 9.0, is there any way to get them to work?
For now, I'm just using .AddJsonFile("secrets.json")
. Works fine.