Code Analysis and Web Projects
In a recent Visual Studio Team System Dev/Test PU Public Community Chats the following question was posted:
Q: Can I use FxCop/PREfast to analysis the web application codes? Especially in .aspx.cs?
I wanted to use this as a opportunity to talk about code analysis and asp.Net. In VSTS the managed code analysis tool (FxCop) can be enabled for Web projects. Similar to client projects a developer can chose a set of rules to run against their project, enable analysis as part of a build, or analyze the project as using a explicit command. The results of the analysis will appear in the error list so the developer can investigate the results and resolve the issues in an acceptable way. One area that we have been working on a lot recently with the ASP.Net team is improving the signal-to-noise ratio in analysis over Web projects.
As we continue to improve the analysis, we push towards providing an experience that allows developers to focus on real issues that may impact the quality to their code and limit the time they investigate warnings that do not apply to their project.