
In Program.cs, update the check for Environment.IsDevelopment so it looks like the following. Right.click the ASP.NET Core project and choose Reload Project. When you've updated the reference, it should look like this (substituting your own project folder and project name). csproj file, update the project reference and add with the value set to false. Right-click the ASP.NET Core project in Solution Explorer and choose Unload project. In Solution Explorer, right-click the ASP.NET Core project and choose Add > Project Reference. To use publish, create your JavaScript project using Visual Studio 2022 version 17.3 or later. This prevents opening the web page with the source weather data.

Uncheck the Launch Browser option for https. Go to the Debug menu and select Open debug launch profiles UI option. In Solution Explorer, right-click the ASP.NET Core project and choose Properties. If the browser you want is not yet installed, install the browser first, and then select it. Select an installed browser from the Debug toolbar, such as Chrome or Microsoft Edge. Once the project is created, Solution Explorer should look like this:Ĭompared to the standalone React template, you see some new and modified files for integration with ASP.NET Core: Give your project and solution a name, and then choose Create to create the solution.

Search for React in the search bar at the top and then select React and ASP.NET Core (Preview). In the Start window (choose File > Start Window to open), select Create a new project.

This template creates two projects in the initial solution and eliminates several configuration steps compared to the previous template. A simplified, updated template is available starting in Visual Studio 2022 version 17.5.
