开发者

Analyzing an asp.net site with ndepend

开发者 https://www.devze.com 2022-12-14 20:49 出处:网络
I\'m trying to analyze a web site (built with asp.net) with ndepend. If a take a look at the CQL queries about \"unused code / dead code\", the tool cites almost all my methods (including the onload,

I'm trying to analyze a web site (built with asp.net) with ndepend.

If a take a look at the CQL queries about "unused code / dead code", the tool cites almost all my methods (including the onload, onprerender, ...), which is obviously wrong.

Does anyone have any idea what I can do开发者_开发技巧 to have a better result ? Thanks in advance


As I can see from NDepend FAQ (look for "How can I analyse my ASP.NET application with NDepend?"), you'll have to precompile your web-site and analyze it after that. There's how-to there.


exception790, the methods you are quoting onload, onprerender... are indeed never statically used in the code but are dynamically used (at runtime) by the ASP.NET infrastructure.

NDepend being a static analyzer, it can't anticipate dynamic calls.

0

精彩评论

暂无评论...
验证码 换一张
取 消