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
Copy file name to clipboardExpand all lines: bridge/articles/bridge-to-kubernetes-vs-code.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,8 +201,6 @@ Learn more about Bridge to Kubernetes at [How Bridge to Kubernetes works][btk-ho
201
201
202
202
If you need to debug multiple services at the same time in parallel, see [Debug multiple services at the same time](parallel-services.md).
203
203
204
-
Information about the currently supported features and a future roadmap for Bridge to Kubernetes may be found at [Bridge to Kubernetes roadmap](https://github.com/microsoft/mindaro/projects/1).
Copy file name to clipboardExpand all lines: bridge/articles/bridge-to-kubernetes-vs.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,8 +186,6 @@ If you cloned that repo locally, you can delete it manually.
186
186
187
187
Learn more about Bridge to Kubernetes at [How Bridge to Kubernetes works](overview-bridge-to-kubernetes.md).
188
188
189
-
For information about supported features and a roadmap for Bridge to Kubernetes, see [Bridge to Kubernetes roadmap](https://github.com/microsoft/mindaro/projects/1).
190
-
191
189
To learn how to connect your development computer to a cluster by using Visual Studio Code, check out this article:
192
190
> [!div class="nextstepaction"]
193
191
> [Use Bridge to Kubernetes (VS Code)](bridge-to-kubernetes-vs-code.md)
Copy file name to clipboardExpand all lines: docs/get-started/csharp/tutorial-aspnet-core.md
+20-51Lines changed: 20 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ ms.author: meghaanand
6
6
manager: mijacobs
7
7
ms.subservice: general-ide
8
8
ms.topic: tutorial
9
-
ms.date: 11/17/2023
10
-
9
+
ms.date: 10/17/2024
11
10
dev_langs:
12
11
- CSharp
13
12
ms.devlang: csharp
13
+
#customer intent: As a developer, I want to create a ASP.NET Core web application with C# in Visual Studio.
14
14
---
15
15
# Tutorial: Get started with C# and ASP.NET Core in Visual Studio
16
16
@@ -28,11 +28,10 @@ This tutorial shows you how to:
28
28
29
29
## Prerequisites
30
30
31
-
You need Visual Studio to complete this tutorial. Visit the [Visual Studio downloads page](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-tutorial-create-csharp-aspnetcore-web-app-page-cta) for a free version.
32
-
33
-
- For more information about upgrading to the latest Visual Studio release, see [Visual Studio updates](../../install/update-visual-studio.md).
31
+
To complete this tutorial, you need:
34
32
35
-
- To customize your Visual Studio experience, see [personalize the Visual Studio IDE and Editor](../../ide/personalizing-the-visual-studio-ide.md).
33
+
- Visual Studio installed. Visit the [Visual Studio downloads page](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-tutorial-create-csharp-aspnetcore-web-app-page-cta) for a free version. For more information about upgrading to the latest Visual Studio release, see [Visual Studio updates](../../install/update-visual-studio.md).
34
+
- The **ASP.NET and web development** workload installed. To verify or install this workload in Visual Studio, select **Tools** > **Get Tools and Features**. For more information, see [Change workloads or individual components](../../install/modify-visual-studio.md#change-workloads-or-individual-components).
36
35
37
36
## Create a project
38
37
@@ -50,21 +49,6 @@ First, you create an ASP.NET Core project. The project type comes with all the t
50
49
51
50
:::image type="content" source="./media/vs-2019/csharp-create-new-project-aspnet-core.png" alt-text="Screenshot that shows the ASP.NET Core Web App project template highlighted in the New Project dialog box in Visual Studio." lightbox="./media/vs-2019/csharp-create-new-project-aspnet-core.png":::
52
51
53
-
> [!NOTE]
54
-
> If you don't see the **ASP.NET Core Web App** template, you can install it from the **Create a new project** window.
55
-
>
56
-
> In the **Not finding what you're looking for?** message at the bottom of the list of templates, select the **Install more tools and features** link.
57
-
>
58
-
> 
59
-
>
60
-
> In the Visual Studio Installer, select **ASP.NET and web development**.
61
-
>
62
-
> 
63
-
>
64
-
> Select **Modify** in the Visual Studio Installer. You might be prompted to save your work. Select **Continue** to install the workload.
65
-
>
66
-
> Return to step 2 in this "[Create a project](#create-a-project)" procedure.
67
-
68
52
1. In the **Configure your new project** window, enter **MyCoreApp** in the **Project name** field. Then, select **Next**.
69
53
70
54
:::image type="content" source="./media/vs-2019/csharp-name-your-aspnet-app.png" alt-text="Screenshot that shows the Configure your new project window in Visual Studio with MyCoreApp entered in the Project name field." lightbox="./media/vs-2019/csharp-name-your-aspnet-app.png":::
@@ -94,43 +78,28 @@ Visual Studio opens your new project.
94
78
95
79
:::image type="content" source="media/vs-2022/start-window-create-new-project.png" border="false" alt-text="Screenshot shows the start window for Visual Studio. Create a new project option is highlighted.":::
96
80
97
-
1. In the **Create a new project** window, select **C#** from the Language list. Next, select **Windows** from the platform list, and **Web** from the project types list.
81
+
1. In the **Create a new project** window, select **C#** from the Language list. Next, select **Windows** from the **All platforms**list, and **Web** from the **All project types** list.
98
82
99
-
After you apply the language, platform, and project type filters, select the **ASP.NET Core Web App** template, and then select **Next**.
83
+
After you apply the language, platform, and project type filters, select the **ASP.NET Core Web App (Razor Pages)** template, and then select **Next**.
100
84
101
85
:::image type="content" source="media/vs-2022/csharp-create-new-project-aspnet-core.png" border="false" alt-text="Screenshot that shows the ASP.NET Core Web App project template selected and highlighted on the Create a new project page." lightbox="media/vs-2022/csharp-create-new-project-aspnet-core.png":::
102
86
103
-
> [!NOTE]
104
-
> If you don't see the **ASP.NET Core Web App** template, you can install it from the **Create a new project** window.
105
-
>
106
-
> In the **Not finding what you're looking for?** message at the bottom of the list of templates, select the **Install more tools and features** link.
107
-
>
108
-
> :::image type="content" source="media/vs-2022/not-finding-what-looking-for.png" alt-text="Screenshot shows the Install more tools and features link that is part of the Not finding what you're looking for message.":::
109
-
>
110
-
> In the Visual Studio Installer, select the **ASP.NET and web development** workload.
111
-
>
112
-
> :::image type="content" source="media/vs-2022/aspnet-core-web-dev-workload.png" alt-text="Screenshot shows the ASP.NET and web development workload in the Visual Studio Installer.":::
113
-
>
114
-
> Select **Modify** in the Visual Studio Installer. You might be prompted to save your work. Select **Continue** to install the workload.
115
-
>
116
-
> Return to step 2 in this "[Create a project](#create-a-project)" procedure.
117
-
118
87
1. In the **Configure your new project** window, enter **MyCoreApp** in the **Project name** field. Then, select **Next**.
119
88
120
89
:::image type="content" source="media/vs-2022/csharp-name-your-aspnet-app.png" border="false" alt-text="Screenshot that shows the Configure your new project window in Visual Studio with MyCoreApp entered in the Project name field." lightbox="media/vs-2022/csharp-name-your-aspnet-app.png":::
121
90
122
91
1. In the **Additional information** window, verify that **.NET 8.0** appears in the **Target Framework** field.
123
92
124
-
From this window, you can enable Docker support and add authentication support. The drop-down menu for **Authentication Type** has the following four options:
93
+
From this window, you can enable container support and add authentication support. The drop-down menu for **Authentication Type** has the following four options:
125
94
126
95
-**None**: No authentication.
127
96
-**Individual accounts**: These authentications are stored in a local or Azure-based database.
128
97
-**Microsoft identity platform**: This option uses Microsoft Entra ID or Microsoft 365 for authentication.
129
98
-**Windows**: Suitable for intranet applications.
130
99
131
-
Leave the **Enable Docker** box unchecked, and select **None** for Authentication Type.
100
+
Leave the **Enable container support** box unchecked, and select **None** for Authentication Type.
132
101
133
-
:::image type="content" source="media/vs-2022/aspnet-core-additional-information.png" border="false" alt-text="Screenshot that shows the default settings in the Additional information window where the target framework is set to .NET 8.0." lightbox="media/vs-2022/aspnet-core-additional-information.png":::
102
+
:::image type="content" source="media/vs-2022/aspnet-core-enable-container-window.png" border="false" alt-text="Screenshot that shows the default settings in the Additional information window where the target framework is set to .NET 8.0." lightbox="media/vs-2022/aspnet-core-additional-information.png":::
134
103
135
104
1. Select **Create**.
136
105
@@ -309,14 +278,13 @@ This solution follows the **Razor Page** design pattern. It's different than the
309
278
310
279
## Run, debug, and make changes
311
280
312
-
1. In the toolbar, select the **IIS Express** button to build and run the app in debug mode. Alternatively, press **F5**, or go to **Debug** > **Start Debugging** from the menu bar.
281
+
1. In the toolbar, select the **https** button to build and run the app in debug mode. Alternatively, press **F5**, or go to **Debug** > **Start Debugging** from the menu bar.
313
282
314
-
:::image type="content" source="media/vs-2022/csharp-aspnet-razor-iis-express.png" alt-text="Screenshot shows the I I S Express button highlighted in the toolbar in Visual Studio.":::
283
+
:::image type="content" source="media/vs-2022/aspnet-core-https-build-run.png" alt-text="Screenshot shows the https button highlighted in the toolbar in Visual Studio.":::
315
284
316
285
> [!NOTE]
317
-
> If you get an error message that says **Unable to connect to web server 'IIS Express'**, close Visual Studio and then relaunch the program as an administrator. You can do this task by right-clicking the Visual Studio icon from the Start Menu, and then selecting the **Run as administrator** option from the context menu.
318
-
>
319
-
> You might also get a message that asks if you want to accept an IIS SSL Express certificate. To view the code in a web browser, select **Yes**, and then select **Yes** if you receive a follow-up security warning message.
286
+
> You might also get a message that asks if you want to accept an ASP.NET Core SSL certificate. To view the code in a web browser, select **Yes**, and then select **Yes** if you receive a follow-up security warning message.
287
+
> Learn more about [enforcing SSL in ASP.NET Core](/aspnet/core/security/enforcing-ssl).
320
288
321
289
1. Visual Studio launches a browser window. You should then see **Home** and **Privacy** pages in the menu bar.
322
290
@@ -347,7 +315,7 @@ This solution follows the **Razor Page** design pattern. It's different than the
347
315
- The first argument for the method specifies how the date should be displayed. This example uses the format specifier (`d`) which indicates the short date format.
348
316
- The second argument is the [CultureInfo](/dotnet/api/system.globalization.cultureinfo) object that specifies the culture or region for the date. The second argument determines, among other things, the language of any words in the date, and the type of separators used.
349
317
350
-
Change the body of the `OnGet()` method to the following code:
318
+
Change the body of the `OnGet()` method in **Privacy.cshtml.cs**to the following code:
351
319
352
320
```csharp
353
321
publicvoidOnGet()
@@ -391,9 +359,9 @@ This solution follows the **Razor Page** design pattern. It's different than the
391
359
392
360
:::image type="content" source="media/vs-2022/csharp-aspnet-index-cshtml-page-hello-world.png" alt-text="Screenshot shows the Index.cshtml file in the Visual Studio Code editor with the 'Welcome' text changed to 'Hello World!'.":::
393
361
394
-
1. Select **IIS Express** or press **Ctrl**+**F5** to run the app and open it in a web browser.
362
+
1. Select **https** or press **Ctrl**+**F5** to run the app and open it in a web browser.
395
363
396
-
:::image type="content" source="media/vs-2022/csharp-aspnet-generic-iis-button.png" alt-text="Screenshot shows the IIS Express button highlighted in the toolbar for Visual Studio.":::
364
+
:::image type="content" source="media/vs-2022/csharp-aspnet-core-https-button.png" alt-text="Screenshot shows the https button highlighted in the toolbar for Visual Studio.":::
397
365
398
366
1. In the web browser, you see your new changes on the **Home** page.
399
367
@@ -415,6 +383,7 @@ Or, learn how to containerize your web app with Docker:
415
383
> [!div class="nextstepaction"]
416
384
> [Container Tools in Visual Studio](../../containers/overview.md)
417
385
418
-
## See also
386
+
## Related links
419
387
420
-
[Publish your web app to Azure App Service by using Visual Studio](../../deployment/quickstart-deploy-aspnet-web-app.md)
388
+
-[Publish your web app to Azure App Service by using Visual Studio](../../deployment/quickstart-deploy-aspnet-web-app.md)
389
+
-[Personalize the Visual Studio IDE and Editor](../../ide/personalizing-the-visual-studio-ide.md)
- If you get an error message that says **Invalid project configuration**, make sure that you've specified a solution platform or project platform (for example, `Debug|Win32`).
60
60
61
-
## Example
61
+
## Examples
62
62
63
63
The following command builds the project `CSharpWinApp`, using the `Debug` project build configuration within `MySolution`.
To build an installer (`.msi` file), you need a [setup project](../../deployment/installer-projects-net-core.md), which has a `.vdproj` project file, but to build it you first need to apply a workaround that sets a particular registry key. From the Visual Studio Developer command prompt, run the executable *DisableOutOfProcBuild.exe* from the folder *Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild*. Without this workaround, you may get the error: `ERROR: An error occurred while validating. HRESULT = '8000000A'`. The command affects the current user, so for build agent scenarios, be sure to run it from the same account that runs the build. For more information, see the *README.txt* file in the same folder.
78
+
79
+
Also, in Visual Studio, you can create a new [configuration](../../ide/understanding-build-configurations.md), say `Setup`, based on the `Release` configuration, and select the setup project as a project to build. By default, setup projects aren't included in the default configurations, `Debug` and `Release`. With the `Setup` configuration defined, the following commands build a project `WindowsFormsApp1` and its associated setup project to generate the `.msi` file:
80
+
81
+
```shell
82
+
devenv WindowsFormsApp1.sln /build Setup
83
+
```
84
+
85
+
If the solution was already built with the **Release** configuration, this command just builds the setup project.
86
+
69
87
## See also
70
88
71
89
- [Build and clean projects and solutions](../../ide/building-and-cleaning-projects-and-solutions-in-visual-studio.md)
Copy file name to clipboardExpand all lines: docs/version-control/git-with-visual-studio.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Not only can you add both [GitHub and GitHub Enterprise accounts to your keychai
29
29
30
30
:::image type="content" source="media/vs-2022/git-source-control-create-repository.png" alt-text="Screenshot of the Create a Git Repository dialog box in Visual Studio." lightbox="media/vs-2022/git-source-control-create-repository.png":::
31
31
32
-
If you want to use git commands at the command line, you should also install [Git for Windows](https://book.git-scm.com/download/win) (not a Microsoft product).
32
+
If you want to use git commands at the command line, you should also install [Git for Windows](https://git-scm.com/downloads/win) (not a Microsoft product).
0 commit comments