Waseem Akhtar
Waseem Akhtar

Reputation: 33

Using multiple analyzers in Roslyn

I have done a lot of searching around before asking this question. I am new to developing diagnostic tools and code fixes using Roslyn. I am currently using the Visual Studio 2014 CTP. I have been able to successfully create my first code fix tool. However, when I create another tool in a new solution, it still shows up the Description and fixes for the old diagnostic tool.

Can anyone please explain to me what I am doing wrong? I am rebuilding the solution before I test it out, and as far as I am aware, I am keeping both solutions completely separated. Or can anyone tell me how I can use multiple rules in one solution?

Upvotes: 0

Views: 891

Answers (1)

David Poeschl
David Poeschl

Reputation: 864

Building the .vsix project created by the templates will install a vsix extension into a special VS hive. These are not automatically uninstalled, so go to Tools | Extensions to uninstall them as necessary.

As SLaks mentioned, you can have multiple diagnostic projects in your solution, but you'll have to update the vsixmanifest in the vsix project to include this new project. If you want the multiple diagnostics to always be distributed together, then just put them in the same project (copy the class structure & exports from the sample).

Upvotes: 2

Related Questions