Monday, March 9, 2009

Where did my Visual T4 IntelliSense go?


If you're using Refactor! or Resharper you will notice that the IntelliSense provided by the Visual T4 Editor for embedded C# code blocks doesn’t work as expected.

The reason for this is the above mentioned tools replace the built-in Visual Studio C# IntelliSense and provide their custom ones.

This doesn’t play well with any other tool expecting the built-in IntelliSense to be there, as it is the case for our Visual T4 Editor and the built-in ASP.NET editor which won’t also behave well if you have any of the two refactoring tools installed.

The cure? Download and install this patch.

Then: open Visual Studio and go to Tools -> Options, open the tree at Text Editor\T4 Editor\Miscellaneous and check the Intellisense replacement item.

This is a new experimental feature that tries to mitigate Refactor! and Resharper “hacky manners” of replacing the built-in IntelliSense and will get back to normal the IntelliSense support while editing a C# embedded code block in a T4 template.

We’ve also detected that these refactoring tools don’t do a great job of restoring previous settings after uninstalling them, so it may be the case that you once used them but you currently don’t have any of them installed and you still don’t get proper IntelliSense. This can be fixed this way: go to Tools –> Options, browse the tree at Text Editor\C#\General and make sure Auto list members is checked.

We want to thank all of our customers that are also Refactor! or Reshaper customers and have reported this, you can all now enjoy the fix!.

1 comments:

  1. Great post, looking forward for the next one.......
    ReplyDelete