473,499 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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
Feb 6 '06 #1
0 2331

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1743
by: Chua Wen Ching | last post by:
I had use fxcop to check my code. I had 1 confusion here. I would normally call a method by this way in my IAnimal: Example: public void CallFuncA(ushort port); But fxcop says i need to...
3
3418
by: Rasmus | last post by:
I VS 2005 beta 2 i have a solution with - a number of classes - a website - a httphandler - a http module I want to run fxcop on my class files - but cant find out how to enable it. I've...
8
1887
by: hansiman | last post by:
Just beginning using FxCop in my asp.net projects... I get a lot of error messages under the header: AvoidUnusedParameters for funtions and routines lik: Sub isUserAuthenticated(ByVal...
3
2234
by: Velvet | last post by:
I ran FxCop on one of the components for my web site and the security rules what me to add " tags like the ones listed below: This breaks my ASP.NET application. So my question is,...
4
379
by: Bruce One | last post by:
Given a project with some .cs files, Is there a way to block some of these files to be read by FxCop ?
10
1684
by: Karsten Schramm | last post by:
I would write BaseClass var; ..... if(var is DerivedClass) { DerivedClass derivedVar = (DerivedClass)var; DoSomething(derivedVar); }
5
5073
by: Peter Ritchie [C# MVP] | last post by:
I've purposely been ignoring a CA2122 warning in some C++ interop code I've been working on for quite some time. I've just recently had the cycles to investigate the warning. The warning message...
6
1363
by: John Wright | last post by:
I ran FxCop against a program and was pleased with the security review except I get the following error: Do not indirectly expose methods How would I fix this code so this error goes away. I...
3
4366
by: AlexS | last post by:
When I implement Dispose pattern in object implementing IDisposable, current fxcop recommends: Ensure that Wrapper.Dispose():Void is declared as public and sealed. However, if I do as it asks,...
0
7128
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7006
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7385
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.