问题
My problem is that the Nuget packages (inside solutions /packages folder) are causing a lot of warnings and analyzing them is taking ages.
I have tried excluding folders from static analysis with no success. I have an understanding that this would be achieved using a CAExcludePath enviroment variable. But where should I set the CAExcludePath environment variable? I have already tried setting it through project->debugger->environment field.
回答1:
The variable is accessible in C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\CodeAnalysis\Microsoft.CodeAnalysis.Targets
and its value can be seen by increasing build output verbosity (Tools->Options->Projects and Solutions->Build and Run -> MSBuild project build output verbosity to 'Diagnostic'
). Setting the variable did not helped me with the issue though. Edit: I'm using MSVS Professional 2017 ver 15.2 (26430.15)
来源:https://stackoverflow.com/questions/38245700/how-to-exclude-folders-from-c-core-guidelines-checkers-check-path