FxCop CustomRules for Perfomace monitoring.
-
Thursday, August 09, 2012 6:39 AM
Hi
I want to write some custom rules to check the performance of the application.Below are the some set of rules i am going to write.Is it possible to implement those rules in FxCop.
1.Avoid Multiple DB Invocation in single transaction
2.Data Processing logic should be in Database layer
3.Create resources as when required
4.Use DB Connection from pool managed server.
Thanks in Advance
Vasanth.
All Replies
-
Friday, August 10, 2012 2:17 AMModerator
Hi Vasanth,
I might not have the correct detailed answer you need, but I might lead you into the right direction to solve your problem.
We often use the FXCOP to write the custom Rule. FxCop is a binary analysis tool. It does not look at your app's source code, and it looks at the IL in the binaries your program's source code produces when it is compiled. So we'd better first use MSIL Disassembler to view the IL these are generated after we build our app and then write our own custom FxCop rules.
These are guides of writing the custom FxCop rule: http://www.binarycoder.net/fxcop/index.html and http://www.codeproject.com/Articles/30666/7-Steps-to-Write-Your-Own-Custom-Rule-using-FXCOP. So you could get the detailed steps to write a custom rule.
Reference:
How to write custom static code analysis rules and integrate them into Visual Studio 2010.
I don’t have much more experience to write the custom rule, if it is still hard for you to write the rules, if possible, I suggest you submit this feature request: http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there. Thanks for your understanding.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Jack Zhai - MSFTMicrosoft Contingent Staff, Moderator Thursday, August 16, 2012 3:14 AM
-
Friday, August 10, 2012 4:37 AMThanks for your Post Jack.It is very helpful for me to undersatnd how to write the custom FxCop rules.
-
Monday, August 13, 2012 2:43 AMModerator

