Question: I had my PC re-imaged for me. I have Visual Studio Version 14.0.25123.00 Update 2 installed on my computer. I'm getting this error when I try to use VS intellisense to reference another project. 

> 
> CSharpAddImportCodeFixProvider encountered an error and has been disabled
> 
> 
> 

I have two projects. One of them using namespace `ProjectName.Web`. And the other project using `ProjectName.Web.Controllers`. The provider crashes when I reference `ProjectName.Web.Controllers`, I believe because it is setup as a project. Any idea how to fix this?

Answer: 
I end up with this same error.
what i did was to manually go and find the nuget packet for System.Data.SqlClient, installed and then invoke it in the class i was working on, like: 

```
using System.Data.SqlClient;

```

Dont know if this is some kind of bug, cause it happens on a new blank project i create using visual studio 2019 community

hope it helps someone
Judging from the label you were given, "CSharpAddImportCodeFixProvider", I'd guess your problem was due to Visual Studio trying to identify and/or correct a missing "using" statement at the top of your C# source code file in which you made reference to a class that needed it. The Visual Studio components that usually deal with this type of problem are Intellisense, or third-party syntax highlighting/correction plugins like JetBrains' ReSharper.

On second thought, I'm not quite sure it's Intellisense's fault as opposed to the plugin ReSharper's. That's to be determined.

I did file a similar bug report with Microsoft. The error in my case seemed to be a result of the Intellisense not knowing how to deal with a logic error in my own code (see <https://connect.microsoft.com/VisualStudio/feedback/details/3133049>). 

In my case, I had inadvertently placed code for a method outside its class definition, though inside its similarly named namespace. Visual Studio 2015 Update 3 complained, 

> 
> 'GenerateVariableCodeFixProvider' encountered an error and has been
>  disabled.
> 
> 
> 

The fix was to move my method back into its corresponding class definition, but it definitely brought a Visual Studio bug up to the surface. 

Specifically, Visual Studio Intellisense had seen the line of code, 

```
    Response.Write("I did something"); 

```

placed in a method that was declared outside a class definition (i.e., inside a namespace, but inadvertently not inside its class). The "'FeatureLabel' encountered an error and has been disabled" error was then displayed in a yellow bar across the top of my editor window and an "Enable" button and an "Enable and ignore future errors" button were displayed next to it.

I believe that Intellisense (or ReSharper?) tried to automatically deal with the situation and attempted to generate a variable for the keyword, "Response", but it tripped trying to do so--which in turn caused the error that was displayed.