在Asp.Net 5中,开发速度更快,因为它在保存时编译.
但我仍然需要手动刷新浏览器.
但我仍然需要手动刷新浏览器.
Visual Studio中是否有实时重新加载选项,还是应该使用gulp插件?
解决方法
您可以启用BrowserLink并在编辑代码时按Ctrl Alt Enter以使浏览器自动刷新.或者,您可以点击Visual Studio工具栏中的浏览器链接刷新按钮.
public void Configure(IApplicationBuilder application) { // Only enable browser link if IHostingEnvironment says it's // running in Development. if (this.hostingEnvironment.IsDevelopment()) { // Allow updates to your files in Visual Studio to be shown in // the browser. You can use the Refresh // browser link button in the Visual Studio toolbar or Ctrl+Alt+Enter // to refresh the browser. application.UseBrowserLink(); } // Omitted... }
您还需要在project.json中添加Browser Link NuGet包:
"dependencies": { "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta7",// Omitted... }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。