|
1 | 1 | ---
|
2 |
| -title: Quickstart for Azure App Configuration with .NET Framework | Microsoft Docs |
| 2 | +title: Quickstart for Azure App Configuration with .NET Framework |
3 | 3 | description: In this article, create a .NET Framework app with Azure App Configuration to centralize storage and management of application settings separate from your code.
|
4 | 4 | services: azure-app-configuration
|
5 | 5 | author: maud-lv
|
6 | 6 | ms.service: azure-app-configuration
|
7 | 7 | ms.devlang: csharp
|
8 | 8 | ms.custom: devx-track-csharp, mode-other, devx-track-dotnet
|
9 | 9 | ms.topic: quickstart
|
10 |
| -ms.date: 02/28/2023 |
| 10 | +ms.date: 05/24/2024 |
11 | 11 | ms.author: malev
|
12 | 12 | #Customer intent: As a .NET Framework developer, I want to manage all my app settings in one place.
|
13 | 13 | ---
|
14 | 14 | # Quickstart: Create a .NET Framework app with Azure App Configuration
|
15 | 15 |
|
16 | 16 | There are two ways to incorporate Azure App Configuration into a .NET Framework-based app.
|
| 17 | + |
17 | 18 | - The configuration builder for App Configuration enables data from App Configuration to be loaded to App Settings. Your app accesses configuration as it always does via `ConfigurationManager`. You don't need to make any code change other than updates to *app.config* or *web.config* files. This quickstart will walk you through this option.
|
18 | 19 | - As is designed by the .NET Framework, the App Settings can only refresh upon application restart. The App Configuration .NET provider is a .NET Standard library. It supports caching and refreshing configuration dynamically without application restart. If the dynamic configuration is essential to you and you are willing to make code changes, see tutorials on how you can implement dynamic configuration updates in a [.NET Framework console app](./enable-dynamic-configuration-dotnet.md) or an [ASP.NET web app](./enable-dynamic-configuration-aspnet-netfx.md).
|
19 | 20 |
|
@@ -86,19 +87,21 @@ Add the following key-value to the App Configuration store and leave **Label** a
|
86 | 87 |
|
87 | 88 | ## Build and run the app
|
88 | 89 |
|
89 |
| -1. Set an environment variable named **ConnectionString** to the read-only key connection string obtained during your App Configuration store creation. |
| 90 | +1. Set an environment variable named **ConnectionString** to the read-only key connection string obtained during your App Configuration store creation. |
90 | 91 |
|
91 | 92 | If you use the Windows command prompt, run the following command:
|
| 93 | + |
92 | 94 | ```console
|
93 | 95 | setx ConnectionString "connection-string-of-your-app-configuration-store"
|
94 | 96 | ```
|
95 | 97 |
|
96 | 98 | If you use Windows PowerShell, run the following command:
|
| 99 | + |
97 | 100 | ```powershell
|
98 | 101 | $Env:ConnectionString = "connection-string-of-your-app-configuration-store"
|
99 | 102 | ```
|
100 | 103 |
|
101 |
| -1. Restart Visual Studio to allow the change to take effect. |
| 104 | +1. Restart Visual Studio to allow the change to take effect. |
102 | 105 |
|
103 | 106 | 1. Press Ctrl + F5 to build and run the console app. You should see the message from App Configuration outputs in the console.
|
104 | 107 |
|
|
0 commit comments