Reputation: 635
How can I suppress the warnings generated by MS Fakes in a build ? I already edited the XML file to generate only the elements we need, but it’s not enough.
Error message
Cannot generate shim for RestServiceHelper`2+<>c: type is not supported because of internal limitations.
XML sample
<Fakes xmlns="schemas.microsoft.com/fakes/2011/"; Diagnostic="false">
<Assembly Name="Common.Api"/>
<StubGeneration>
<Clear />
</StubGeneration>
<ShimGeneration>
<Clear />
<Add FullName="RestServiceHelper" />
</ShimGeneration>
</Fakes>
I have already read this thread before asking my question: Suppressing Microsoft Fakes warnings
Thanks
Upvotes: 3
Views: 1795
Reputation: 8181
The better way to avoid this issue is to use a stricter filter in the XML file. Add a !
character to the end of the filter to use case sensitive precise matching:
<ShimGeneration>
<Clear />
<Add FullName="RestServiceHelper!" />
</ShimGeneration>
As per the documentation:
Upvotes: 0
Reputation: 177
You can suppress the warning via the following statement:
<Remove TypeName="<>c" />
Upvotes: 2