Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Good tools to find dead C# code...

Good tools to find dead C# code...

Scheduled Pinned Locked Moved C#
csharphtmlcomtoolsquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Salil Khedkar
    wrote on last edited by
    #1

    I want to clean up my projects C# source code by removing things (unused functions, variables, parameters etc) which are no longer being used. ;) I could find a tool for VB [^] but not for C# yet. Can anybody recommend me a good one?

    H F A 3 Replies Last reply
    0
    • S Salil Khedkar

      I want to clean up my projects C# source code by removing things (unused functions, variables, parameters etc) which are no longer being used. ;) I could find a tool for VB [^] but not for C# yet. Can anybody recommend me a good one?

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Visual Studio 2005 includes a static analysis tool that may do the trick. This was previously known as FxCop (well, still is) and is available on http://gotdotnet.com[^]. The important thing to keep in mind, however, is if other assemblies are using that functionality. If you've exposed such entities publicly and you're assemblies are used by third-parties you should go a version or two using the ObsoleteAttribute on those entities and eventually removing them. This will help third-parties maintaining their code to know that soon that functionality will be non-existant in future versions. If this code is being used by COM clients do not change interfaces that have already been published. This violates certain rules of COM that make allow for newer implementations to implement older interfaces that older clients know about and can use without breaking. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Customer Product-lifecycle Experience Microsoft [My Articles] [My Blog]

      1 Reply Last reply
      0
      • S Salil Khedkar

        I want to clean up my projects C# source code by removing things (unused functions, variables, parameters etc) which are no longer being used. ;) I could find a tool for VB [^] but not for C# yet. Can anybody recommend me a good one?

        F Offline
        F Offline
        FriendlyFiend
        wrote on last edited by
        #3

        What about NCover, its primarily used to check for test coverage but can be used for your purposes too I think

        1 Reply Last reply
        0
        • S Salil Khedkar

          I want to clean up my projects C# source code by removing things (unused functions, variables, parameters etc) which are no longer being used. ;) I could find a tool for VB [^] but not for C# yet. Can anybody recommend me a good one?

          A Offline
          A Offline
          Andre Ziegler
          wrote on last edited by
          #4

          ReSharper[^] is a good really tool. 'A programmer is just a tool which converts caffeine into code'

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups