How to add a custom code analyzer to a project without nuget or VSIX?

冷暖自知 提交于 2019-12-13 12:04:55

问题


I want to write a custom code analyzer in Visual Studio 2015 for a C# ConsoleApplication. For this reason I don't want to create a seperate "Analyzer with Code Fix" project from template, because this requires to add this analyzer in my projects as nuget package.


Is it possible, to add a analyzer reference manually? I would like to reference the analyzer without nuget.


回答1:


If you add an analyzer as Nuget and check the content of your project, you'll see that only an <Analyzer Include="..." /> item is added. You can do the same manually. Also, you can do this in the .csproj.user file as well, so you can also do it locally, and not commit this change to your SCM.



来源:https://stackoverflow.com/questions/40780157/how-to-add-a-custom-code-analyzer-to-a-project-without-nuget-or-vsix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!