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
Make sure that the version of `Microsoft.FeatureManagement` is greater than 3.1.0.
57
68
58
69
1. Open *Program.cs* and add the following statements.
59
70
71
+
### [Microsoft Entra ID (recommended)](#tab/entra-id)
72
+
73
+
```csharp
74
+
using Microsoft.Extensions.Configuration;
75
+
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
76
+
using Microsoft.FeatureManagement;
77
+
using Azure.Identity;
78
+
```
79
+
80
+
### [Connection string](#tab/connection-string)
81
+
60
82
```csharp
61
83
using Microsoft.Extensions.Configuration;
62
84
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
63
85
using Microsoft.FeatureManagement;
64
86
```
87
+
---
65
88
66
-
1. Update *Program.cs*. to connect to your App Configuration store using Microsoft Entra ID (recommended) or a connection string, and specify the `UseFeatureFlags` option so that feature flags are retrieved. Create a `ConfigurationFeatureDefinitionProvider` to provide feature flag definition from the configuration and a `FeatureManager` to evaluate feature flags' state. Then display a message if the `Beta` feature flag is enabled.
89
+
1. Update the *Program.cs* file and add a call to the `UseFeatureFlags` method to load feature flags from App Configuration. Then create a `FeatureManager` to read feature flags from the configuration. Finally, display a message if the *Beta* feature flag is enabled.
90
+
91
+
You can connect to your App Configuration store using Microsoft Entra ID (recommended) or a connection string.
67
92
68
93
### [Microsoft Entra ID (recommended)](#tab/entra-id)
69
94
@@ -77,14 +102,11 @@ You can use Visual Studio to create a new console app project.
0 commit comments