locked
Code metrics for unmanaged C++ code? RRS feed

  • Question

  • Does code metrics in Visual Studiu 2008 Tema System  work for unmanaged C++ code?
    Wednesday, October 8, 2008 10:15 AM

Answers

  • From my experience the answer is no.  In fact, I just tried it and got the following error:

    Project: Utilities9
    Configuration: Debug
    Scope: None
    Assembly: c:\sourcecode\Shared_VS2008\libs\Utilities9D.lib
    Maintainability Index:
    Cyclomatic Complexity:
    Depth of Inheritance:
    Class Coupling:
    Lines of Code:
    Message: An error occurred while calculating code metrics for target file 'c:\sourcecode\Shared_VS2008\libs\Utilities9D.lib' in project Utilities9. Bad magic number.

    Wednesday, October 8, 2008 8:08 PM

All replies

  • From my experience the answer is no.  In fact, I just tried it and got the following error:

    Project: Utilities9
    Configuration: Debug
    Scope: None
    Assembly: c:\sourcecode\Shared_VS2008\libs\Utilities9D.lib
    Maintainability Index:
    Cyclomatic Complexity:
    Depth of Inheritance:
    Class Coupling:
    Lines of Code:
    Message: An error occurred while calculating code metrics for target file 'c:\sourcecode\Shared_VS2008\libs\Utilities9D.lib' in project Utilities9. Bad magic number.

    Wednesday, October 8, 2008 8:08 PM
  • No code metrics only supports managed code right now. Unfortunately we haven't seen enough demand for native code metrics to make it a high priority for our next release. Thanks for your comment though, I'll count it as a vote to add this feature in the future.

    -Todd
    VS Code Analysis Team
    • Proposed as answer by qtormanen Tuesday, November 11, 2008 8:59 PM
    Thursday, October 23, 2008 8:34 PM
    Moderator
  • Please add another vote for code metrics for native C/C++. I am a VS2008 Pro user, and was interested in the code analysis functionality in VSTS 2008. I was very pleased with the Static Code Analysis (PreFast) built in, but was very disappointed that the metrics didn't work. I guess I stay with VS2008 Pro. :-(
    --Quinton
    Tuesday, November 11, 2008 8:58 PM
  •  
    Todd King said:

    No code metrics only supports managed code right now. Unfortunately we haven't seen enough demand for native code metrics to make it a high priority for our next release. Thanks for your comment though, I'll count it as a vote to add this feature in the future.

    -Todd


    VS Code Analysis Team



    What's the deal of adding such a general/global feature for select group of devs... makes me feel "screwed". 
    How are the native devs different from the others? I bet they're all the same guys.

    Next time a new feature is implemented in VS, put a thick red sticker labeled ".NET ONLY", or it gets all messed up, since, somehow, I managed to read that "Code Analysis provides code metrics for both managed (.Net) & unmanaged C++ code..." in the setup.
    Thursday, November 27, 2008 11:20 PM
  • +1, I want Code metrics in native C++
    Wednesday, December 17, 2008 10:14 PM
  • Count me in for the C++ Code Analysis Metrics. We need this badly...
    Monday, February 23, 2009 3:49 PM
  • FYI: For anyone who uses CodeRush/Refactor! Pro or just Refactor! Pro their Code Metrics tool also supports unmanaged C++. I've no idea whether you get it with the MS-licensed free Refactor! for C++ though. I guess not.

    Kevin
    Wednesday, February 25, 2009 11:45 AM
  • +100 for native code metrics!
    Saturday, April 4, 2009 11:30 AM
  • And.. yet another vote in favor of code metrics for native c/c++.
    Thursday, April 30, 2009 11:24 AM
  • I am missing code metrics for native code very much, please count this as vote for more powerful code analysis for native C++.
    Thursday, May 28, 2009 8:56 AM
  • One more for code metrics for unmanaged C++...
    I'm also interested by test coverage for unmanaged C++ code as we have to maintain hundreds of thousand lines of Visual C++...
    Tuesday, September 29, 2009 8:31 AM
  • Vote++ !!!

    Tuesday, November 17, 2009 8:44 PM
  • CppDepend provides a useful plugin for that.
    Tuesday, May 4, 2010 5:47 PM
  • vote +0xFFFFFFFF for code metric for native unmanaged code specially C++
    Thursday, August 5, 2010 2:08 PM
  • vote +((unsigned int) -1) for me. Visual studio 2010. I'm not even remotely interrested in managed code. 
    Monday, December 6, 2010 10:43 AM
  • vote +((unsigned int) -1) for me. Visual studio 2010. I'm not even remotely interrested in managed code.

    I'll pay more attention to this, Thanks to the reminding!
    Sunday, January 23, 2011 5:14 AM
  • We need code metrics for our C++ code as well.  Please put it in the next release !!!!
    Friday, April 1, 2011 3:55 PM
  • Hi, count my vote as another vote for adding unmanaged code metrics analyzer in future.
    Sunday, April 10, 2011 5:21 AM
  • Hi, count my vote as another one for unmanaged c++.

    Wednesday, April 13, 2011 5:50 PM
  • It kind of makes metrics meaningless for managed projects with both native and managed C++ classes.

    Count me in for a vote.

    Wednesday, July 6, 2011 11:38 AM
  • Here is another vote ++
    Best Regards, Andy Pham
    Tuesday, August 2, 2011 3:44 PM
  • Another vote for C++ code metrics
    MFalcon
    Thursday, August 4, 2011 7:53 AM
  • Please, another vote for C++ code metrics. Mitch
    Monday, August 29, 2011 3:41 PM
  • +1 vote for C/C++ code metrics
    Morten
    Saturday, October 29, 2011 7:50 AM
  • ++Vote;
    Wednesday, November 9, 2011 12:23 PM
  • +1 for code metrics for unmanaged code!!

    Monday, December 19, 2011 2:37 PM
  • +1 for code metrics for unmanaged code
    Wednesday, February 15, 2012 9:27 PM
  • ++Vote; // We need it!

    Friday, November 9, 2012 4:44 AM