Sign in to follow this  

[.net] Checkstyle for C#

This topic is 3856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a some tool that will check the style of C# code? Also if there is anything that will do instrumenting like PMD for Java? For that matter I'm wonderring if there is a tool like Ant but for C#? Thanks in advance. L-

Share this post


Link to post
Share on other sites
For a style checker, there's FxCop:
Quote:
FxCop is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. It uses reflection, MSIL parsing, and callgraph analysis to inspect assemblies for more than 200 defects in the following areas:

Library design
Localization
Naming conventions
Performance
Security


Not sure regarding instrumentation.

As for a build tool, there's MSBuild. The neat thing is that the .NET 2.0 redist comes with MSBuild, and Visual Studio 2005 C#/VB projects are MSBuild projects. MSBuild also has knowledge of the solution format used by Visual Studio. All this combined lets you build C# 2.0 projects without any IDE.

Share this post


Link to post
Share on other sites
Very Cool!!!

What is MSBuild like? I'll google it, but I'm guessing something like 'make' or actually something like 'ant'?

Alright I looked, it's something like Ant. The question is though how to build only specific targets? IF 'target' works in the same way that 'target' works in Ant???

L-

Share this post


Link to post
Share on other sites
You can run %windir%\microsoft.net\framework\v2.0.50727\msbuild /? for help. Example from the help on building a specific target:

MSBuild MyApp.sln /t:Rebuild /p:Configuration=Release

Share this post


Link to post
Share on other sites

This topic is 3856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this