Correct the casing of namespace name 'aejw.Network'. Correct the spelling of the unrecognized token 'aejw' in namespace 'aejw.Network'. No valid permission requests were found for assembly 'AccountValue'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum. If assembly permission requests have been specified, they are not enforceable; use the PermView.exe tool to view the assembly's permissions. Whidbey customers can use PermCalc.exe which gives even more detailed information. Sign 'AccountValue' with a strong name key. 'AccountValue' should be marked with CLSCompliantAttribute and its value should be true. 'DEVMODE1' should be declared inside a namespace. Correct the capitalization of type name 'DEVMODE1'. 'DEVMODE1' should override Equals. 'DEVMODE1' should override the equality (==) and inequality (!=) operators. Make 'dmBitsPerPel' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the spelling of the unrecognized token 'Pel' in member name 'DEVMODE1.dmBitsPerPel'. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmBitsPerPel'. Make 'dmCollate' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmCollate'. Make 'dmColor' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmColor'. Make 'dmCopies' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmCopies'. Make 'dmDefaultSource' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDefaultSource'. Make 'dmDeviceName' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDeviceName'. Make 'dmDisplayFlags' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDisplayFlags'. Make 'dmDisplayFrequency' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDisplayFrequency'. Make 'dmDitherType' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDitherType'. Make 'dmDriverExtra' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDriverExtra'. Make 'dmDriverVersion' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDriverVersion'. Make 'dmDuplex' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmDuplex'. Make 'dmFields' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmFields'. Make 'dmFormName' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmFormName'. Make 'dmICMIntent' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of member name 'DEVMODE1.dmICMIntent'. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmICMIntent'. Make 'dmICMMethod' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of member name 'DEVMODE1.dmICMMethod'. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmICMMethod'. Make 'dmLogPixels' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmLogPixels'. Make 'dmMediaType' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmMediaType'. Make 'dmOrientation' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmOrientation'. Make 'dmPanningHeight' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPanningHeight'. Make 'dmPanningWidth' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPanningWidth'. Make 'dmPaperLength' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPaperLength'. Make 'dmPaperSize' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPaperSize'. Make 'dmPaperWidth' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPaperWidth'. Make 'dmPelsHeight' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the spelling of the unrecognized token 'Pels' in member name 'DEVMODE1.dmPelsHeight'. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPelsHeight'. Make 'dmPelsWidth' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the spelling of the unrecognized token 'Pels' in member name 'DEVMODE1.dmPelsWidth'. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPelsWidth'. Make 'dmPrintQuality' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmPrintQuality'. Make 'dmReserved1' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmReserved1'. Make 'dmReserved2' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmReserved2'. Make 'dmScale' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmScale'. Make 'dmSize' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmSize'. Make 'dmSpecVersion' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmSpecVersion'. Make 'dmTTOption' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmTTOption'. Make 'dmYResolution' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Correct the capitalization of 'dm' in member name 'DEVMODE1.dmYResolution'. 'User_32' is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class is intended to contain only static methods, consider adding a private constructor to prevent the compiler from generating a default constructor. Because it is a DllImport method, User_32.ChangeDisplaySettings(DEVMODE1&, Int32):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Because it is a DllImport method, User_32.EnumDisplaySettings(String, Int32, DEVMODE1&):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. DragExtender..ctor() initializes field m_form of type System.Windows.Forms.Form to null. Remove this initialization as it will be done automatically by the runtime. Correct the spelling of the unrecognized token 'Draggable' in member name 'DragExtender.GetDraggable(Control):Boolean'. Because it is a DllImport method, DragExtender.ReleaseCapture(IntPtr):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Change the accessibility of DllImport 'DragExtender.ReleaseCapture(IntPtr):Int32' so that it is no longer visible from outside its assembly. Because it is a DllImport method, DragExtender.SendMessage(IntPtr, Int32, Int32, Int32&):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. 'DragExtender.SendMessage(IntPtr, Int32, Int32, Int32[]):Int32' appears to have no upstream public or protected callers. Because it is a DllImport method, DragExtender.SendMessage(IntPtr, Int32, Int32, Int32[]):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Correct the spelling of the unrecognized token 'Draggable' in member name 'DragExtender.SetDraggable(Control, Boolean):Void'. Modify 'Form1..ctor()' to catch a more specific exception than 'System.Object' or rethrow the exception. Form1..ctor() initializes field tempHeight of type System.Int32 to 0. Remove this initialization as it will be done automatically by the runtime. Form1..ctor() initializes field tempWidth of type System.Int32 to 0. Remove this initialization as it will be done automatically by the runtime. Form1..ctor() declares a local, 'ChangeRes', of type Resolution.CResolution, which is never used or is only assigned to. Use this local or remove it. Form1..ctor() makes a call to System.Convert.ToInt32(System.String) that does not explicitly provide an IFormatProvider. This should be replaced with a call to System.Convert.ToInt32(System.String,System.IFormatProvider). Form1..ctor() makes a call to System.Convert.ToInt32(System.String) that does not explicitly provide an IFormatProvider. This should be replaced with a call to System.Convert.ToInt32(System.String,System.IFormatProvider). The 'this' parameter (or 'Me' in VB) of Form1.createDesktopLinks(String, String):Void is never used. Mark the method as static (or Shared in VB) or use 'this'/Me in the method body. Form1.GetDiskFreeSpace(String):DiskFreeSpace calls into Marshal.GetLastWin32Error():Int32 which has a LinkDemand. By making this call, Marshal.GetLastWin32Error():Int32 is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection: ->System.Runtime.InteropServices.Marshal.GetLastWin32Error : Int32 ->AccountValue.Form1.GetDiskFreeSpace(System.String) : DiskFreeSpace Add the MarshalAsAttribute to the return type of PInvoke Form1.GetDiskFreeSpaceEx(String, Int64&, Int64&, Int64&):Boolean. If the corresponding unmanaged return type is a 4-byte Win32 'BOOL', use MarshalAs(UnmanagedType.Bool). For a 1-byte C++ 'bool', use MarshalAs(UnmanagedType.U1). Because it is a DllImport method, Form1.GetDiskFreeSpaceEx(String, Int64&, Int64&, Int64&):Boolean should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Form1.InitializeComponent():Void calls into WebBrowser.add_DocumentCompleted(WebBrowserDocumentCompletedEventHandler):Void which has a LinkDemand. By making this call, WebBrowser.add_DocumentCompleted(WebBrowserDocumentCompletedEventHandler):Void is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection: ->System.Windows.Forms.WebBrowser.add_DocumentCompleted(System.Windows.Forms.WebBrowserDocumentCompletedEventHandler) : Void ->AccountValue.Form1.InitializeComponent : Void ->AccountValue.Form1.#ctor : Void Modify 'Form1.login_clicked():Void' to catch a more specific exception than 'System.Exception' or rethrow the exception. Modify 'Form1.login_clicked():Void' to catch a more specific exception than 'System.Exception' or rethrow the exception. Modify 'Form1.login_clicked():Void' to catch a more specific exception than 'System.Object' or rethrow the exception. Modify 'Form1.login_clicked():Void' to catch a more specific exception than 'System.Object' or rethrow the exception. Modify 'Form1.login_clicked():Void' to catch a more specific exception than 'System.Object' or rethrow the exception. Modify 'Form1.login_clicked():Void' to catch a more specific exception than 'System.Object' or rethrow the exception. Modify 'Form1.login_clicked():Void' to catch a more specific exception than 'System.Object' or rethrow the exception. Change Form1.login_clicked():Void to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. If it is set to RightTolLeft.Inherit, check its parent until a value indicating Yes or No is found. Change Form1.login_clicked():Void to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. If it is set to RightTolLeft.Inherit, check its parent until a value indicating Yes or No is found. Replace the call to String.Equals("") in 'Form1.login_clicked():Void' with a call to String.IsNullOrEmpty. Replace the call to String.Equals("") in 'Form1.login_clicked():Void' with a call to String.IsNullOrEmpty. Form1.timer2_Tick(Object, EventArgs):Void declares a local, 'temp', of type System.Int64, which is never used or is only assigned to. Use this local or remove it. Form1.webBrowser1_DocumentCompleted(Object, WebBrowserDocumentCompletedEventArgs):Void makes a call to System.Convert.ToInt32(System.String) that does not explicitly provide an IFormatProvider. This should be replaced with a call to System.Convert.ToInt32(System.String,System.IFormatProvider). Form1.webBrowser1_DocumentCompleted(Object, WebBrowserDocumentCompletedEventArgs):Void makes a call to System.Convert.ToInt32(System.String) that does not explicitly provide an IFormatProvider. This should be replaced with a call to System.Convert.ToInt32(System.String,System.IFormatProvider). Do not nest type 'AccountValue.Form1+DiskFreeSpace' or change its accessibility so that it is not externally visible. 'AccountValue.Form1+DiskFreeSpace' should override Equals. 'AccountValue.Form1+DiskFreeSpace' should override the equality (==) and inequality (!=) operators. Make 'FreeBytesAvailable' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Make 'TotalBytes' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Make 'TotalFreeBytes' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Make 'label1' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Make 'label2' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. Make 'progressBar1' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. NetworkDrive..ctor() initializes field lf_Force of type System.Boolean to false. Remove this initialization as it will be done automatically by the runtime. NetworkDrive..ctor() initializes field lf_Persistent of type System.Boolean to false. Remove this initialization as it will be done automatically by the runtime. NetworkDrive..ctor() initializes field lf_SaveCredentials of type System.Boolean to false. Remove this initialization as it will be done automatically by the runtime. NetworkDrive..ctor() initializes field ls_PromptForCredentials of type System.Boolean to false. Remove this initialization as it will be done automatically by the runtime. Correct the casing of parameter name 'Password'. The discrete term 'Username' in parameter 'Username' should be expressed as a compound term, 'UserName'. Correct the casing of parameter name 'Username'. Correct the casing of parameter name 'Password'. Correct the casing of parameter name 'ParentForm'. Correct the casing of parameter name 'ParentForm'. Correct the capitalization of 'Un' in member name 'NetworkDrive.UnMapDrive():Void'. Because it is a DllImport method, NetworkDrive.WNetAddConnection2A(structNetResource&, String, String, Int32):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Because it is a DllImport method, NetworkDrive.WNetCancelConnection2A(String, Int32, Int32):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Because it is a DllImport method, NetworkDrive.WNetConnectionDialog(Int32, Int32):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Because it is a DllImport method, NetworkDrive.WNetDisconnectDialog(Int32, Int32):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Because it is a DllImport method, NetworkDrive.WNetRestoreConnectionW(Int32, String):Int32 should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. The 'this' parameter (or 'Me' in VB) of NetworkDrive.zDisplayDialog(Form, Int32):Void is never used. Mark the method as static (or Shared in VB) or use 'this'/Me in the method body. Modify 'NetworkDrive.zMapDrive(String, String):Void' to catch a more specific exception than 'System.Object' or rethrow the exception. Replace the call to String.op_Equality("") in 'NetworkDrive.zMapDrive(String, String):Void' with a call to String.IsNullOrEmpty. Replace the call to String.op_Equality("") in 'NetworkDrive.zMapDrive(String, String):Void' with a call to String.IsNullOrEmpty. The 'this' parameter (or 'Me' in VB) of NetworkDrive.zRestoreDrive():Void is never used. Mark the method as static (or Shared in VB) or use 'this'/Me in the method body. CResolution..ctor(Int32, Int32) calls into Marshal.SizeOf(Object):Int32 which has a LinkDemand. By making this call, Marshal.SizeOf(Object):Int32 is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection: ->System.Runtime.InteropServices.Marshal.SizeOf(System.Object) : Int32 ->Resolution.CResolution.#ctor(System.Int32,System.Int32) : Void ->AccountValue.Form1.#ctor : Void CResolution..ctor(Int32, Int32) declares a local, 'screen', of type System.Windows.Forms.Screen, which is never used or is only assigned to. Use this local or remove it. Change CResolution..ctor(Int32, Int32) to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. If it is set to RightTolLeft.Inherit, check its parent until a value indicating Yes or No is found. Change CResolution..ctor(Int32, Int32) to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. If it is set to RightTolLeft.Inherit, check its parent until a value indicating Yes or No is found. Change CResolution..ctor(Int32, Int32) to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. If it is set to RightTolLeft.Inherit, check its parent until a value indicating Yes or No is found. Change CResolution..ctor(Int32, Int32) to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. If it is set to RightTolLeft.Inherit, check its parent until a value indicating Yes or No is found. Assemblies should declare minimum security Permission requests prevent security exceptions from being thrown after code in an assembly has already begun executing. With permission requests, the assembly does not load if it has insufficient permissions. This rule will fire if you have specified a permission request incorrectly, or incompletely. If you have specified requests but FxCop reports a violation for this rule, use the PermView.exe tool to view the security permissions in the assembly. An unenforceable permission appears as an empty permission set. Whidbey customers can use PermCalc.exe which gives even more detailed information. You should add attributes specifying what permissions your assembly will demand, might demand, and what permissions it does not want granted. For example, the following attribute indicates that an assembly will, at minimum, require read access to the UserName environment variable: [assembly:EnvironmentPermissionAttribute(SecurityAction.RequestMinimum, Read="UserName")]. To specify permissions that the assembly might demand, use SecurityAction.RequestOptional. To specify permissions that the assembly must not be granted, use SecurityAction.RequestRefuse. No valid permission requests were found for assembly '{0}'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum. If assembly permission requests have been specified, they are not enforceable; use the PermView.exe tool to view the assembly's permissions. Whidbey customers can use PermCalc.exe which gives even more detailed information. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Usage/AssembliesShouldDeclareMinimumSecurity.html fxcopbug@microsoft.com CriticalError Assemblies should have valid strong names Either the assembly has no strong name, an invalid one, or the strong name is valid only because of the computer configuration. The assembly should not be deployed in this state. The most common causes of this are: 1) The assembly's contents were modified after it was signed. 2) The signing process failed. 3) The assembly was delay-signed. 4) A registry key existed that allowed the check to pass (where it would not have otherwise). Sign '{0}' with a strong name key. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Design/AssembliesShouldHaveValidStrongNames.html fxcopbug@microsoft.com CriticalError Avoid uncalled private code There is uncalled code that is not externally visible and is not a known runtime entry point. If this violation fires in error, please send a problem report to the FxCop team. '{0}' appears to have no upstream public or protected callers. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Performance/AvoidUncalledPrivateCode.html fxcopbug@microsoft.com Warning Avoid uninstantiated internal classes An internal class was detected that is apparently never instantiated. This rule does not attempt to detect late-bound creation and will generate false positives if instances of a type are only created in this way (for example, by means of Activator.CreateInstance or by passing the type as an argument to a TypeConverter constructor). '{0}' is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class is intended to contain only static methods, consider adding a private constructor to prevent the compiler from generating a default constructor. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Performance/AvoidUninstantiatedInternalClasses.html fxcopbug@microsoft.com Warning Avoid unused parameters Avoid declaring parameters that are not used in the method body. Unused parameters incur maintenance and performance costs. Sometimes a violation of this rule can point to an implementation bug in the method (i.e. the parameter should actually have been used in the method body). Exclude warnings of this rule if the parameter has to exist because of backward compatibility. The 'this' parameter (or 'Me' in VB) of {0} is never used. Mark the method as static (or Shared in VB) or use 'this'/Me in the method body. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Performance/AvoidUnusedParameters.html fxcopbug@microsoft.com Warning Compound words should be cased correctly Avoid creating compound words from terms which exist in the dictionary as discrete terms. Do not create a compound word such as 'StopWatch' or 'PopUp'. These terms are recognized in the dictionary and should be cased as 'Stopwatch' and 'Popup'. The discrete term '{0}' in {1} '{2}' should be expressed as a compound term, '{3}'. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Naming/CompoundWordsShouldBeCasedCorrectly.html fxcopbug@microsoft.com Error Declare types in namespaces A type should be defined inside a namespace to avoid duplication. '{0}' should be declared inside a namespace. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Design/DeclareTypesInNamespaces.html fxcopbug@microsoft.com Error Do not catch general exception types You should not catch Exception or SystemException. Catching generic exception types can hide run-time problems from the library user, and can complicate debugging. You should catch only those exceptions that you can handle gracefully. Modify '{0}' to catch a more specific exception than '{1}' or rethrow the exception. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Design/DoNotCatchGeneralExceptionTypes.html fxcopbug@microsoft.com CriticalError Do not declare visible instance fields Public or protected instance fields limit your ability to change the implementation details for those data items. Use properties instead. They do not compromise usability or performance and they do provide flexibility in that they conceal the implementation details of the underlying data. Make '{0}' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Design/DoNotDeclareVisibleInstanceFields.html fxcopbug@microsoft.com Error Do not indirectly expose methods with link demands Do not wrap a method protected by a LinkDemand with a method that does not perform a security check. A LinkDemand checks the permissions of the immediate caller rather than checking the permissions of all callers in the call stack. In this case, the permissions of the wrapper method will be checked. If the wrapper method does not, itself, check the permissions of callers higher in the call stack, malicious code might be able to execute the wrapped function even though it lacks permission to do so. {0} calls into {1} which has a LinkDemand. By making this call, {1} is indirectly exposed to user code. Review the following call stack that might expose a way to circumvent security protection: {2} http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Security/DoNotIndirectlyExposeMethodsWithLinkDemands.html fxcopbug@microsoft.com CriticalError Do not initialize unnecessarily Do not make initializations that have already been done by the runtime. {0} initializes field {1} of type {2} to {3}. Remove this initialization as it will be done automatically by the runtime. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Performance/DoNotInitializeUnnecessarily.html fxcopbug@microsoft.com Warning Identifiers should be cased correctly Type, namespace, and member identifiers are pascal-cased. Parameter identifiers are camel-cased. The pascal-casing convention capitalizes the first letter of each word, as in BackColor. The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor. Correct the casing of namespace name '{0}'. Correct the casing of parameter name '{0}'. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Naming/IdentifiersShouldBeCasedCorrectly.html fxcopbug@microsoft.com Error Identifiers should be spelled correctly The individual words that make up an identifier should not be abbreviated and should be spelled correctly. If this rule generates a false positive on a term that should be recognized, add the word to the FxCop custom dictionary. Correct the spelling of the unrecognized token '{0}' in member name '{1}'. Correct the spelling of the unrecognized token '{0}' in namespace '{1}'. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Naming/IdentifiersShouldBeSpelledCorrectly.html fxcopbug@microsoft.com CriticalWarning Long acronyms should be pascal-cased Acronyms of three or more letters should be Pascal-cased. For example, use XmlSpace rather than XMLSpace. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. Correct the capitalization of member name '{0}'. Correct the capitalization of type name '{0}'. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Naming/LongAcronymsShouldBePascalCased.html fxcopbug@microsoft.com Error Mark assemblies with CLSCompliant Assemblies should explicitly state their Cls compliance using the CLSCompliant attribute. An assembly without this attribute is not CLS-compliant. Assemblies, modules, and types can be CLS-compliant even if some parts of the assembly, module, or type are not CLS-compliant. The following rules apply: 1) If the element is marked CLSCompliant, any noncompliant members must have the CLSCompliant attribute present with its argument set to false. 2) A comparable CLS-compliant alternative member must be supplied for each member that is not CLS-compliant. '{0}' should be marked with CLSCompliantAttribute and its value should be true. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Design/MarkAssembliesWithClsCompliant.html fxcopbug@microsoft.com Error Mark boolean pinvoke arguments with MarshalAs All boolean pinvoke parameters and return types should be explicitly marked with the MarshalAs attribute. By default, the system will marshal all booleans as 4-byte UnmanagedType.Bool. This is the correct behavior for Win32 'BOOL' arguments but incorrect for C++ 'bool' arguments, which should be marshaled as 1-byte UnmanagedType.U1. For code maintainability reasons, always explicitly specify the marshaling information for boolean arguments and return values. Add the MarshalAsAttribute to the return type of PInvoke {0}. If the corresponding unmanaged return type is a 4-byte Win32 'BOOL', use MarshalAs(UnmanagedType.Bool). For a 1-byte C++ 'bool', use MarshalAs(UnmanagedType.U1). http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Interoperability/MarkBooleanPInvokeArgumentsWithMarshalAs.html fxcopbug@microsoft.com Warning Move pinvokes to native methods class This type contains members with the DllImport attribute. Members with the DllImport attribute should be contained in classes named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. Because it is a DllImport method, {0} should be defined in a class named NativeMethods, SafeNativeMethods, or UnsafeNativeMethods. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Design/MovePInvokesToNativeMethodsClass.html fxcopbug@microsoft.com CriticalWarning Nested types should not be visible Do not use public, protected or protected internal (Protected Friend) nested types as a way of grouping types. Use namespaces for this purpose. There are very limited scenarios where nested types are the best design. Also, nested type member accessibility is not clearly understood by all audiences. Enumerators are exempt from this rule. Do not nest type '{0}' or change its accessibility so that it is not externally visible. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Design/NestedTypesShouldNotBeVisible.html fxcopbug@microsoft.com Error Override equals and operator equals on value types The default System.ValueType implementation might not perform as well as a custom implementation. '{0}' should override Equals. '{0}' should override the equality (==) and inequality (!=) operators. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Performance/OverrideEqualsAndOperatorEqualsOnValueTypes.html fxcopbug@microsoft.com Warning PInvokes should not be visible Interop layer should not be public. The DllImport attribute should not be applied to publicly accessible members (public or protected). Change the accessibility of DllImport '{0}' so that it is no longer visible from outside its assembly. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Interoperability/PInvokesShouldNotBeVisible.html fxcopbug@microsoft.com CriticalError Remove unused locals Remove locals that are not used or are only assigned to in method implementations. {0} declares a local, '{1}', of type {2}, which is never used or is only assigned to. Use this local or remove it. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Performance/RemoveUnusedLocals.html fxcopbug@microsoft.com Warning Short acronyms should be uppercase Two letter acronyms should be upper-cased. For example, use System.IO instead of System.Io. Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, 'DbConnection', is common but incorrect; use DBConnection. A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them. Correct the capitalization of '{0}' in member name '{1}'. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Naming/ShortAcronymsShouldBeUppercase.html fxcopbug@microsoft.com Error Specify IFormatProvider If an overload exists that takes an IFormatProvider argument, it should always be called in favor of an overload that does not. Some methods in the common language runtime convert a value to or from a string representation and take a string parameter that contains one or more characters, called format specifiers, which indicate how the value is to be converted. If the meaning of the format specifier varies by culture, a formatting object supplies the actual characters used in the string representation. In scenarios where sorting and comparison behavior should never change between cultures, specify CultureInfo.InvariantCulture. {0} makes a call to {1} that does not explicitly provide an IFormatProvider. This should be replaced with a call to {2}. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Globalization/SpecifyIFormatProvider.html fxcopbug@microsoft.com Error Specify MessageBoxOptions In order to run correctly on right-to-left systems, all calls to MessageBox.Show should use the overload that specifies MessageBoxOptions as an argument. Programs should detect whether they are running on a right-to-left system at run-time and pass the appropriate MessageBoxOptions value in order to display correctly. Change {0} to call the MessageBox.Show overload that specifies MessageBoxOptions, and make sure to set MessageBoxOptions.RightAlign and MessageBoxOptions.RtlReading if RightToLeft is set to RightToLeft.Yes on the parent control. If it is set to RightTolLeft.Inherit, check its parent until a value indicating Yes or No is found. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Globalization/SpecifyMessageBoxOptions.html fxcopbug@microsoft.com Error Test for empty strings using string length To test for empty strings, check if String.Length is equal to zero. Constructs such as "".Equals(someString) and String.Empty.Equals(someString) are less efficient than testing the string length. Replace these with checks for someString.Length == 0. Replace the call to String.{0}({1}) in '{2}' with a call to String.IsNullOrEmpty. http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=unstable&url=/Performance/TestForEmptyStringsUsingStringLength.html fxcopbug@microsoft.com Warning