简体   繁体   English

将 IIS 与 Visual Studio 2019 和 ASP.NET CORE 3.1 一起使用

[英]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.

相关问题 ASP.NET Core 3.1 使用 XmlSerializerFormatters() - ASP.NET Core 3.1 using XmlSerializerFormatters() Visual Studio 2019 中缺少 ASP.NET 核心 Web 应用程序 - Missing ASP.NET Core Web Application from Visual Studio 2019 如何使用 Visual Studio 2019 在 ASP.NET MVC 中集成 Angular 8 项目 - How to integrate Angular 8 project in ASP.NET MVC using Visual Studio 2019 HTTP 错误 500.0 - ASP.NET 核心 IIS Dot.net 核心 3.1 中的托管失败(进程中) - HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) in Dot net core 3.1 在Visual Studio 2008中使用IIS5调试ASp.NET MVC - Debug ASp.NET MVC with IIS5 in Visual Studio 2008 IIS 5.1 ASP.NET MVC Visual Studio 2008 - IIS 5.1 ASP.NET MVC Visual Studio 2008 在 asp.net 核心 3.1 异步编程中使用带有引导程序 4 的徽章 - using badge with bootstrap 4 in asp.net core 3.1 asynchronous programing 在 ASP.NET Core 3.1 中使用多个身份验证方案? - Using multiple authentication schemes in ASP.NET Core 3.1? 使用IIS7无法对asp.net进行Visual Studio 2012调试 - visual studio 2012 debug for asp.net not working using IIS7 IIS Express 上的 ASP.NET Core 3.1 应用程序:“无法访问此站点” - ASP.NET Core 3.1 app on IIS Express: "This site can't be reached"
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM