没有 .pdb 文件的 C# 分析失败 [英] C# analysis fails without .pdb files

查看:42
本文介绍了没有 .pdb 文件的 C# 分析失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 SonarQube 4.2 试用新的 C# 插件 v3.0.根据插件文档,我需要 .pdb 文件来运行包含 FxCop 规则的分析,如果输出文件夹中不存在所述 .pdb 文件,则在执行 sonar-runner 时确实会收到一条失败消息;FxCop 以代码 1536 退出.

I'm trying out the new C# plugin v3.0 with SonarQube 4.2. According to plugin documentation, I need .pdb files to run analysis which includes FxCop rules, and indeed I get a failure message when executing sonar-runner if said .pdb files are not present in the output folder; FxCop exits with code 1536.

问题是,分析似乎需要所有二进制文件的 .pdb 文件,并且输出文件夹除了我自己编译的代码之外还包含几个依赖项.这些是 NuGet 包,我找不到所有这些包的符号文件.

The thing is, the analysis seems to require .pdb files for ALL the binnaries, and the output folder contains several dependencies in addition to my own compiled code. These are NuGet packages and I cannot find symbol files for all of them.

那么,有什么方法可以让我在不调试符号的情况下跳过文件进行分析?常规 SonarQube 文件排除列表似乎仅适用于源代码文件(例如 *.designer.cs),不适用于二进制文件.

So, is there any way I can have the analysis to skip the files without debugging symbols? The regular SonarQube file exclusion lists seem to apply to source code files only (e.g. *.designer.cs) and not for binnaries.

推荐答案

这是 SonarQube C# 插件端的一个错误.我创建了以下票证来修复它:https://jira.codehaus.org/browse/SONARFXCOP-29

This is a bug on the SonarQube C# plugin side. I have created the following ticket to fix it: https://jira.codehaus.org/browse/SONARFXCOP-29

请注意,这与 *.pdb 文件的存在无关,而仅与引用的程序集的存在有关.

Note that this is not related to the presence of *.pdb files, but only on the presence of the referenced assemblies.

这篇关于没有 .pdb 文件的 C# 分析失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆