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
2. Run the following command to restore packages for your project:
86
89
90
+
```CLI
87
91
dotnet restore
88
-
92
+
```
89
93
3. Add a secret named *ConnectionStrings:AppConfig* to Secret Manager.
90
94
91
95
This secret contains the connection string to access your app configuration store. Replace the value in the following command with the connection string for your app configuration store.
92
96
93
97
This command must be executed in the same directory as the *.csproj* file.
94
98
99
+
```CLI
95
100
dotnet user-secrets set ConnectionStrings:AppConfig <your_connection_string>
101
+
```
96
102
97
103
> [!IMPORTANT]
98
104
> Some shells will truncate the connection string unless it is enclosed in quotes. Ensure that the output of the `dotnet user-secrets` command shows the entire connection string. If it doesn't, rerun the command, enclosing the connection string in quotes.
@@ -108,6 +114,11 @@ The Secret Manager tool stores sensitive data for development work outside of yo
108
114
```
109
115
110
116
5. Update the `CreateWebHostBuilder` method to use App Configuration by calling the `config.AddAzureAppConfiguration()` method.
117
+
118
+
> [!IMPORTANT]
119
+
> `CreateHostBuilder` replaces `CreateWebHostBuilder` in .NET Core 3.0. Select the correct syntax based on your environment.
120
+
121
+
### Update `CreateWebHostBuilder` for .NET Core 2.x
111
122
112
123
```csharp
113
124
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
@@ -120,9 +131,23 @@ The Secret Manager tool stores sensitive data for development work outside of yo
120
131
.UseStartup<Startup>();
121
132
```
122
133
134
+
### Update `CreateHostBuilder` for .NET Core 3.x
135
+
136
+
```csharp
137
+
public static IHostBuilder CreateHostBuilder(string[] args) =>
0 commit comments