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: 
There may be multiple reasons why this error occurs. So this answer may not apply to all situations, though it seems that it only occurs when another project is referenced.

The error does not occur for all statements. In my case I had the following code:

```
private System.Threading.Timer Timer;

public void Start()
{
    Timer.Change(0, 60000);
}

```

As soon as intellisense would open for `Timer.Change(` the error occurred. Please note that I had no parameters at that point. If valid parameters are present there will be no error.

I could solve the issue by *updating the version of the framework*. I found out that both projects targetted different frameworks, resp. 4.5.2 and 4.6.

As long as the framework versions are different the error occurs. As soon as both are equal (either 4.5.2 or 4.6) the error no longer shows.

I have tested this with VisualStudioVersion = 14.0.25420.1 (Visual Studio Community 2015).

-- update --

I've reported this as a [bug](https://connect.microsoft.com/VisualStudio/feedback/details/3135356/csharpaddimportcodefixprovider-encountered-an-error-and-has-been-disabled) to Microsoft. Including steps to reproduce.
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.