[英]VisualStudio 2012 with ReSharper go slowly after save file in App_Code
I use Visual Studio 2012 with ReSharper 7. 我将Visual Studio 2012与ReSharper 7一起使用。
The issue occurs when I develop website. 我开发网站时会发生此问题。
I don't develop website in local IIS, but in local-network: they are in local-server, I open they in shared folder, example \\\\my-server\\InetWeb\\Domains\\acme.com\\www_v1
. 我不在本地IIS中开发网站,但是在本地网络中:它们位于本地服务器中,我在共享文件夹中打开它们,例如\\\\my-server\\InetWeb\\Domains\\acme.com\\www_v1
。
When I work with .cshtml
file I have not issues. 当我使用.cshtml
文件时,我没有问题。
But when I save a .cs
file in App_Code folder and go to another .cs
file in App_Code folder, Visual Studio UI don't works, it is freezed for 12 seconds!! 但是,当我在App_Code文件夹中保存一个.cs
文件并转到App_Code文件夹中的另一个.cs
文件时,Visual Studio UI无法正常工作, 它会冻结12秒钟! . 。
Same issue when I create new file in App_Code, or when I rename Class, move file, from/to this folder. 当我在App_Code中创建新文件时,或者当我重命名Class时,将文件从该文件夹移入/移至该文件夹时,也会出现相同的问题。
If I suspend ReSharper, Visual Studio works faster, always. 如果我暂停ReSharper,Visual Studio将始终保持更快的速度。
How can I resolve it? 我该如何解决?
Yesterday I tested ReSharper 8: I have the same issue. 昨天我测试了ReSharper 8:我遇到了同样的问题。
The issue is simply that R# is fairly slow to update it's database. 问题很简单,R#更新数据库的速度相当慢。 The database is typically under the name: SolutionName\\_ReSharper.SolutionName 该数据库通常使用以下名称:SolutionName \\ _ReSharper.SolutionName
The solution can simply be to use another folder to set the R# cache . 解决方案可以简单地是使用另一个文件夹来设置R#缓存 。
I resolved the issue. 我解决了这个问题。 The freeze time go down to 2 seconds or less . 冻结时间降至2秒或更短 。
Previously I open project through shared folder in local server. 以前,我是通过本地服务器中的共享文件夹打开项目的。
I tested to open project through FTP access: I look that the freeze time is done but I have new performance issues. 我测试了通过FTP访问打开项目的过程:冻结时间已经完成,但是我遇到了新的性能问题。
I resolved the issue using WebDAV protocol: 我使用WebDAV协议解决了该问题:
allowSubDirConfig="false"
attribute: 在服务器中,打开“ C:\\ Windows \\ System32 \\ inetsrv \\ config \\ applicationHost.config”,添加allowSubDirConfig="false"
属性:
<configuration>
<system.applicationHost>
<sites>
<site name="Default Web Site">
<application path="/WebDAV">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\WebDAV" logonMethod="Network" />
<virtualDirectory path="/WWW" physicalPath="C:\MyProjects" logonMethod="Network" allowSubDirConfig="false" />
</application>
</site>
</sites>
</system.applicationHost>
</configuration>
applyToWebDAV
attribute to "false": 在同一文件中,将applyToWebDAV
属性设置为“ false”:
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions ... applyToWebDAV="false">
...
</fileExtensions>
</requestFiltering>
</security>
</system.webServer>
</configuration>
Attenction 参与度
this solution is not perfect: 这个解决方案并不完美:
web.config
files 我无法编辑web.config
文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.