FxCop complaints and C++/CLI (CA1047, CA1063, and CA1725)

G

Guest

Hi all,

I am currently building my project with all code analysis turned on. From
what I can tell, it looks to be employing FxCop and PREfast.

The problem is, I am getting the following warnings with a C++/CLI managed
class that implements the disposable pattern via the destructor syntax.

warning: CA1047 : Microsoft.Design : Make 'Dispose' private, public, or
internal (Friend in VB, public private in C++).
warning: CA1063 : Microsoft.Design : Ensure that
HandsfreeDevice.Dispose(Boolean):Void is declared as protected, virtual, and
unsealed.
warning: CA1047 : Microsoft.Design : Make 'Dispose' private, public, or
internal (Friend in VB, public private in C++).
warning: CA1063 : Microsoft.Design : Ensure that
HandsfreeDeviceProxy.Dispose(Boolean):Void is declared as protected, virtual,
and unsealed.
warning: CA1725 : Microsoft.Naming : Change parameter name '' of method
HandsfreeGatewayWinService.Dispose(Boolean):Void to 'disposing' in order to
match the identifier as it has been declared in
Component.Dispose(Boolean):Void.

Of course, the problem is I can't do anything about these since the code is
generated by the compiler.

Has anyone else seen these and know of any way to clean them up? I hate to
supress warnings for such an important mechanism such as the disposable
pattern.

Thanks,

-Trey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top