Visual studio code tutorial api6/3/2023 ![]() Trust the HTTPS development certificate by running the following command: dotnet dev-certs https -trust ![]() Visual Studio launches the default browser and navigates to where is a randomly chosen port number. Select Yes if you agree to trust the development certificate.įor information on trusting the Firefox browser, see Firefox SEC_ERROR_INADEQUATE_KEY_USAGE certificate error. Select Yes if you trust the IIS Express SSL certificate. Visual Studio displays the following dialog when a project is not yet configured to use SSL: Press Ctrl+F5 to run without the debugger. In the License Agreement window, select Agree.In the Select Projects window, select Ok.In the Visual Studio for Mac 2022 toolbar, select Project > Manage NuGet Packages.Confirm the checkbox for Enable OpenAPI support is checked.Confirm the checkbox for Use controllers (uncheck to use minimal APIs) is checked.In the Configure your new API dialog, make the following selections: In the Choose a template for your new project dialog: In Visual Studio for Mac 2022, select File > New Project. When a dialog box asks if you want to add required assets to the project, select Yes. ![]() Add a NuGet package that is needed for the next section.Create a new web API project and open it in Visual Studio Code.Run the following commands: dotnet new webapi -o TodoApiĭotnet add package Confirm the checkbox for Use controllers(uncheck to use minimal APIs) is checked.Ĭhange directories ( cd) to the folder that will contain the project folder. ![]() In the Configure your new project dialog, name the project TodoApi and select Next.Select the ASP.NET Core Web API template and select Next.From the File menu, select New > Project.
0 Comments
Leave a Reply. |