[英]Using IIS with Visual Studio 2019 and ASP.NET CORE 3.1
I am running local IIS, and using vs.net 2019 to build web application.我正在运行本地 IIS,并使用 vs.net 2019 构建 web 应用程序。 All is up and running when I debug-run.
当我调试运行时,一切都已启动并运行。
The question/problem quite simply: when I want to modify the cshtml or the enclosed javascript right now I need to restart the web application pushing F5 again.问题/问题很简单:当我现在想修改 cshtml 或随附的 javascript 时,我需要重新启动 web 应用程序再次按下 F5。 Is there a way I can modify the js/cshtml and just refresh the browser?
有没有办法可以修改 js/cshtml 并刷新浏览器? (this was the workflow I used with .net framework)
(这是我与 .net 框架一起使用的工作流程)
You can use 'dotnet watch'.您可以使用“dotnet watch”。 Open Package manager console and navigate to your project folder.
打开 Package 管理控制台并导航到您的项目文件夹。 Then run 'dotnet watch run' .
然后运行 'dotnet watch run' 。 you can go to browser and visit localhost:5000 (port depends on your configuration) than you will see the app is running.
您可以 go 到浏览器并访问 localhost:5000 (端口取决于您的配置) ,然后您将看到应用程序正在运行。 When you change something on cshtml or js file, refreshing the page will reflect the changes to page.
当您在 cshtml 或 js 文件上更改某些内容时,刷新页面将反映对页面的更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.