简体   繁体   English

如何在Visual Studio 2017中禁用Roslyn语言服务?

[英]How to Disable Roslyn Language Services in Visual Studio 2017?

I have just installed new version of Visual Studio 2017 v15.8. 我刚刚安装了Visual Studio 2017 v15.8的新版本。 There are 8 project in my application. 我的申请中有8个项目。 When I try to open the solution, it takes 1 minutes(in older versions, it was taking 5-10 seconds). 当我尝试打开解决方案时,需要1分钟(在旧版本中,需要5-10秒)。 I tried to solve this problem by 3 different techniques according to my research but none of them solved my problem. 根据我的研究,我尝试用3种不同的技术解决这个问题,但没有一个能解决我的问题。

  1. In "Manage Visual Studio Performance", I tried to disable Roslyn Language Service, but the disable button is disabled. 在“管理Visual Studio性能”中,我尝试禁用Roslyn语言服务,但禁用了禁用按钮。 I mean the disable button is gray. 我的意思是禁用按钮是灰色的。 So it didn't work. 所以它没有用。
  2. In Tools -> Options -> Text Editor -> C# -> Advanced, there is a checkbox named "Enable full solution analysis. Tried to uncheck this but it was already unchecked. So I tried checking and again unchecking but it didn't work. 在工具 - >选项 - >文本编辑器 - > C# - >高级,有一个名为“启用完整解决方案分析的复选框。试图取消选中此项但它已经取消选中。所以我尝试检查并再次取消选中但是它不起作用。
  3. In Tools -> Options -> Text Editor -> All Languages -> CodeLens, there is a checkbox named "Enable CodeLens". 在工具 - >选项 - >文本编辑器 - >所有语言 - > CodeLens中,有一个名为“启用CodeLens”的复选框。 I unchecked this but my problem still exists. 我取消选中此项但我的问题仍然存在。

So how can I disable Roslyn Language Services in Visual Studio 2017? 那么如何在Visual Studio 2017中禁用Roslyn语言服务? Or is there another way that I dont have to disable it? 还是有另一种方法,我不必禁用它?

From the Visual Studio Developer Community : 来自Visual Studio开发人员社区

The Roslyn Language Service is an essential service to VB & C# and cannot be disabled. Roslyn语言服务是VB&C#的基本服务,无法禁用。 The message is simply warning you that the service is taking longer than usual, so if you are experiencing performance problems, you can upload traces for us to investigate at that point via the feedback mechanism. 该消息只是警告您该服务比平时花费的时间更长,因此如果您遇到性能问题,您可以通过反馈机制上传跟踪以供我们调查。

So it seems that disabling the RLS, will actually make your IDE like Notepad. 因此,似乎禁用RLS,实际上会使您的IDE像记事本一样。 Microsoft doesn't allow you to disable it. Microsoft不允许您禁用它。 You can try to get the problem reproduced and fixed. 您可以尝试重现并修复问题。

Did you try the solution in https://developercommunity.visualstudio.com/content/problem/320800/vs-1581-project-load-and-file-access-very-slow.html ? 您是否在https://developercommunity.visualstudio.com/content/problem/320800/vs-1581-project-load-and-file-access-very-slow.html中尝试了该解决方案?

I don't think it is because of Roslyn Language Service. 我不认为这是因为罗斯林语言服务。 Additionally, according to that link, you can upgrade your Visual Studio 2017 version to 15.8.7 or higher. 此外,根据该链接,您可以将Visual Studio 2017版本升级到15.8.7或更高版本。 It will probably solve your problem. 它可能会解决你的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM