ASP.NET Core 6 – React 17 on Visual Studio 2022 with AI IntelliSense

Tram Ho

ASP.NET Core 6 – React 17 on Visual Studio 2022 with AI IntelliSense

Development environment: Visual Studio 2022 Preview, .NET 6 , React 17. Create project

Press F5 to run debug, result

Write first custom middleware, with the presence of AI for IntelliSense, AI suggestion works as I expected.

Write CustomLogger.cs

Add 2 lines (line 1 and line 11) to file Program.cs This is feature called “Top-level statements” in C# 9 https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#top-level-statements

We have Program.cs with content

Publish

Result after publishing: C:\Users\donhuvy\source\repos\ReactNET6\bin\Release\net6.0\publish , run file ReactNET6.exe , go to http://localhost:5000 to see the result.

Share the news now