


Program.csĬontains the following code: var builder = WebApplication.CreateBuilder(args) For more information, see Configuration in ASP.NET Core. appsettings.jsonĬontains configuration data, like connection strings. For more information, see Static files in ASP.NET Core. wwwroot folderĬontains static assets, like HTML files, JavaScript files, and CSS files. For more information, see Layout in ASP.NET Core. This file sets up the navigation menu at the top of the page and the copyright notice at the bottom of the page. For example, the _Layout.cshtml file configures UI elements common to all pages. Supporting files have names that begin with an underscore.
#PASHUA MAC TUTORIAL CODE#
cshtml.cs file that has C# code that handles page events. cshtml file that has HTML markup with C# code using Razor syntax. Pages folderĬontains Razor pages and supporting files.

The following sections contain an overview of the main project folders and files that you'll work with in later tutorials.
#PASHUA MAC TUTORIAL FOR MAC#
Visual Studio for Mac launches a browser and navigates to where is the port number randomly assigned at project creation and is set in Properties/launchSettings.json. The default browser launched with the following URL: Select Debug > Start Debugging to launch the app. At the Select environment prompt, select. In Visual Studio Code, press Ctrl+F5 to run the app. See Trust the ASP.NET Core HTTPS development certificate for more information. The preceding command displays the following dialog, provided the certificate was not previously trusted: See your Linux distribution's documentation for trusting a certificate. The preceding command doesn't work on Linux. Trust the HTTPS development certificate by running the following command: dotnet dev-certs https -trust Launches the default browser at which displays the apps UI.Runs the app, which launches the Kestrel server.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: Select RazorPagesMovie in Solution Explorer, and then press Ctrl+F5 to run without the debugger. Name the project RazorPagesMovie and select Create. Confirm that Authentication is set to No Authentication.Confirm that Target framework is set to the latest.In the Configure your new Web Application dialog: In Visual Studio 2022 for Mac select Web and Console > App > Web Application > Next. The code command opens the RazorPagesMovie folder in the current instance of Visual Studio Code. The dotnet new command creates a new Razor Pages project in the RazorPagesMovie folder. Yes, I trust the authors (because dotnet generated the files).The checkbox trust the authors of all files in the parent folder.Visual Studio Code displays a dialog box that asks Do you trust the authors of the files in this folder. Run the following commands: dotnet new webapp -o RazorPagesMovie The following starter project is created:Ĭhange to the directory ( cd) that will contain the project. NET 6.0 (Long-term support) and then select Create. In the Additional information dialog, select. It's important to name the project RazorPagesMovie, including matching the capitalization, so the namespaces will match when you copy and paste example code. In the Configure your new project dialog, enter RazorPagesMovie for Project name. In the Create a new project dialog, select ASP.NET Core Web App, and then select Next. Start Visual Studio 2022 and select Create a new project.
