I am building a shared UI - razor page in a Lib project (Visual Studio), the purpose is to add the Lib project as ProjectReference to multiple places. I am stuck at finding a way to reflect the .cshtml changes immediately to the browser without restart the main project, which waits me a lot of time.
services.AddMvc().AddRazorRuntimeCompilation();
Setup line above works when I coded UI in main project, but Lib project doesn't.
More information: .Net5.0, Asp.net MVC, Razor page.