User-1330468790 posted
Hi dow7,
It depends on what kind of the "old" razor webpage it is. I think the "razor webpages" here is
Razor Page.
If you have an old razor page project, you might need to import the necessary modules with compatible ASP.NET Core framework.
From the worst condition, if you only have one/few cshtml file(s) with code behind, you might need to add other necessary files/folders:
- Launch settings: The launchSettings.json file contains the IIS settings, the application URL, and other related settings.
- App settings: The appSettings.json file contains configuration data such as connection
strings. For more information about configuration, see the Configuration
in ASP.NET guide.
- wwwroot folder: This folder contains static files, such as HTML, JavaScript, and CSS files. For more information, see Static files in
ASP.NET Core.
- Program.cs: This file contains the entry point for the program. For more information, see ASP.NET Core Web Host.
- Startup.cs: This file contains code that configures app behavior, such as whether the app requires consent for cookies. For more information, see App
startup in ASP.NET Core.
The easiest way would be creating a new razor page project and
add this razor page into the project. You could refer to this:
Create Razor web apps
Hope this can help you.
Best regards,
Sean