how to you code a AvoidCallingProblematicMethods exception to be picked up in FxCop?
问题 I am testing FxCop automation and want to validate it is screening and catching certain rules. I want to make a dll that will trigger the AvoidCallingProblematicMethods error in FxCop. I have the following code but it is not triggering the AvoidCallingProblematicMethods rule at all. what am i doing wrong? // use one of the listed unsafe methods to create a problematic method // http://msdn.microsoft.com/en-us/library/bb385973.aspx for list of offending methods GC.Collect(); how can i trip