简体   繁体   English

Nuget软件包(StyleCop.Analyzers)在重新加载项目时不起作用

[英]Nuget Package (StyleCop.Analyzers) doesn't work on project reload

I've used the Nuget Package Manager in Visual Studio 2017 to install StyleCop.Analyzers, which I'm very happy with. 我已经在Visual Studio 2017中使用了Nuget软件包管理器来安装StyleCop.Analyzers,对此我感到非常满意。 However, every time I close and re-open Visual Studio, StyleCop is no longer listed in the analyzers. 但是,每次我关闭并重新打开Visual Studio时,StyleCop都不再列在分析器中。

The only way I can get it back to analyzing my code is to uninstall it from Nuget, then reinstall it, and go through the process of enabling/disabling rules per that project. 我可以将其重新用于分析代码的唯一方法是从Nuget卸载它,然后重新安装它,并按照每个项目执行启用/禁用规则的过程。 After that, it will work properly. 之后,它将正常工作。 How do I keep StyleCop.Analyzers working when I restart Visual Studio? 重新启动Visual Studio时如何保持StyleCop.Analyzers工作?

It looks like the issue was Unity, so this is a very niche problem. 看来问题出在Unity上,所以这是一个非常特殊的问题。 There are a couple attempts at solving it listed here: 这里列出了几种解决方法:

https://forum.unity.com/threads/unity-and-stylecop-analyzers.639784/ https://forum.unity.com/threads/unity-and-stylecop-analyzers.639784/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM