开发者

fxcop for silverlight code analysis - .net 3.5

I开发者_运维百科s there anyway I can run static code analysis using fxcop for silverlight code in .net 3.5

I found this article as well as a tool XAMLToolkit

These are targetted towards .net 4.0 though!


I'm always struggling to see the difference between the built-in code analysis in vs and fx-cop. I thought that the plan was to converge the two at one point. Anyway, we use the built-in code analysis for silverlight 3 projects and it works fine, both in visual studio and on our build server.

Is there any particular reason not to use the built-in code analysis?


FxCop* can analyse Silverlight from any version greater than 2.0. To do so, you need to add the DLL (built by your project) to the FxCop project. You can find the DLL in the bin directory of your project.

This will analyse your code. If you want to add analysis of your XAML also, you will need to add some additional rules. The easiest way to do that is to use the XAML Toolkit. Unfortunately, at the time of writing this hasn't been updated since April 2010, so don't expect it to be very up-to-date - it probably doesn't work with more recent variants of FxCop.

Footnotes
* 10.0, but probably others.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜