Visual Studio 2013网站刷新/重新启动会忽略代码更改 [英] Visual Studio 2013 Website refresh/restart ignores code changes
问题描述
当我在VS2013中拥有一个网站(Web应用程序或Web类型的项目),并且对代码进行了更改(例如JS更改或HTML更改)时,此更改未反映在刷新后的浏览器.以下是我尝试过但没有奏效的事情:
When I have a website in VS2013 (either a web-application or a web-type project), and I make a change to the code, such as a JS change or an HTML change, this change is not reflected in the browser after a refresh. The following are the things I have tried which did not work:
- 清除浏览器缓存/重新启动浏览器
- 停止VS调试,然后重新启动项目
- 清洁VS解决方案,重建和重新启动
- 清洁VS解决方案,关闭VS,然后完全重新启动VS
- 浏览器链接刷新
使代码更改(JS或html)生效的唯一方法是手动退出IISExpress/VS并重新启动计算机.
The only way I can get my code changes to take effect (either JS or html) is to either manually quit IISExpress/VS and restart my computer.
没有太多戏剧性,这是不可接受的.我该如何解决?
Without being too dramatic, this is unacceptable. How do I fix this?
谢谢.
推荐答案
我也遇到过相同的问题,似乎它来自C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
文件.
I too have come across the same issue and it seems that it comes from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
files.
如果删除这些文件并重新加载页面,则一切正常.我仍然不确定为什么Visual Studio不更新这些文件.
If you delete these files and reload your page everything works. I'm still unsure why Visual Studio is not updating these files.
这篇关于Visual Studio 2013网站刷新/重新启动会忽略代码更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!