I'm looking for an equivalent to the JDT in Visual Studio for C#. Generally, I want to extend Visual Studio with a plugin to analyze C# source code. So what should I look for?
3 Answers
You are looking for the Visual Studio SDK, specifically the Visual Studio Integration SDK section. You may find references to Visual Studio Extensibility (VSX) - they are the same thing.
The learning site for VSX has a few links to get you started, especially in the "Getting Started" section. You can find detailed coverage in the documentation.
EDIT:
If you are looking for a plugin to analyze your code and don't mind buying it, Resharper is the best option. Resharper has its own SDK that allows you to create plugins for it.
If you want to create your own code analysis plugin, you will have to do a bit of work. VS doesn't include any parsing or analysis support. This will come with Project Roslyn, hopefully soon after .NET 4.5 RTMs. Right now it's in CTP and may well be cancelled.
There are some tools that can help with analysis. ANTLR has a .NET distribution.Net that targets C#. Mono.Cecil is a Mono library that inspects IL code and is the basis of almost all .NET decompilers.

- 120,703
- 13
- 188
- 236
-
I agree - all about extending Visual Studio - is VSX (Visual Studio Extensibility) area. There are several types of extending VS: macro, addins and packages. The last one - is the most complex but at the same time - the most powerful. So you will need to create your custom package I believe.. – Dmitry Pavlov Jun 11 '12 at 13:11
-
Another interesting (and maybe related to this question) technology to learnread about is Microsoft “Roslyn”, which enables the C# and Visual Basic compilers to be used as a service. – Dmitry Pavlov Jun 11 '12 at 13:13
-
Roslyn isn't even in beta yet, although it would be the best possible tool for code analysis – Panagiotis Kanavos Jun 11 '12 at 13:42
-
Microsoft® "Roslyn" June 2012 CTP is already available http://msdn.microsoft.com/en-US/roslyn So I guess it possible to start working with it. As I remember we did a lot of nice VS2005 extensions with VSSDK CTPs ;) – Dmitry Pavlov Jun 13 '12 at 08:37
I am not really sure about what you are looking for but ReSharper will help you in many ways.
Taken from their website:
ReSharper is a renowned productivity tool that makes Microsoft Visual Studio a much better IDE. Thousands of .NET developers worldwide wonder how they've ever lived without ReSharper's code inspections, automated refactorings, blazing fast navigation, and coding assistance.
And here are some words about the analysis cabapilities:
On-the-fly code quality analysis in C#, VB.NET, XAML, ASP.NET, ASP.NET MVC, JavaScript, CSS, and XML. ReSharper will tell you right away if your solution contains errors or code that can be improved.
I'm an avid Java developer and I use IntelliJ IDEA from JetBrains who also has developed the ReSharper. ReSharper has taken a lot of goodies from IntelliJ and it is really fantastic to use when you are using VS like I am at the moment.

- 47,113
- 10
- 108
- 118
You probably can check out ReSharper like @maba suggested. But ReSharper is not free.
If you are looking for something free, you have several choices,
- NRefactory from SharpDevelop and MonoDevelop, http://community.sharpdevelop.net/blogs/danielgrunwald/archive/2011/09/19/sharpdevelop-5-nrefactory-5-semantic-highlighting.aspx
- Roslyn from Microsoft, http://www.microsoft.com/en-us/download/details.aspx?id=27746
Based on them you can write Visual Studio addon that provides similar functionalities to ReSharper or JDT.
NRefactory 5 and Roslyn are both in active development phase, so both of them are not yet ready for serious usage.

- 60,503
- 9
- 116
- 147