Closed PulsarFX closed 6 years ago
Hi, did you try this with the FxCop.exe itself? Does it has the same finding?
Yes, it is located in the fxcop result file which is stated in
Writing report to ...\.sonarqube\out\.sonar\test_test_7B57DD30-0834-41BF-8B2A-3A97F60EC320\fxcop-report.xml...
excerpt:
...
<Rules>
<Rule TypeName="ComVisibleTypeBaseTypesShouldBeComVisible" Category="Microsoft.Interoperability" CheckId="CA1405" BreaksBuild="True">
<Name>COM visible type base types should be COM visible</Name>
<Description>COM visible types should have an object hierarchy that is uniformly COM visible.</Description>
<Resolution Name="Default">{0} is marked ComVisible(true) but has the following ComVisible(false) types in its object hierarchy: {1}</Resolution>
<Owner />
<Url>http://msdn.microsoft.com/library/ms182202.aspx</Url>
<Email>[none]</Email>
<MessageLevel Certainty="90">Error</MessageLevel>
<File Name="interoperabilityrules.dll" Version="15.0.0.0" />
</Rule>
</Rules>
...
Ok, than this is not an issue with the plugin because the plugin also uses the fxcop itself for the analyse.
I will Close the issue and recommand you to ask your question in a more General Forum like MSDN.com or stackoverflow.
I have a csproj which triggers this when running the sonar-fxcop:
Which is nonsense to me, as there is no COM in .NET Standard. I also did not do anything to make it ComVisible.
I've put up this sample project to repro:
with a class like this:
DefaultContractResolver is from Newtonsoft.Json package.
The finding can be prevented with this:
Some version info: VS 2017 15.5.7 and the sonar scanner log:
Is this a issue with the sonar-fxcop or VS/fxcop itself? I don't get this from inside Visual Studio.