0

I work on a little C++ open source project. I need to get some metrics out of it. To do so, Visual Studio requires the code to be "managed".

Simple question (expect simple answer) : how do I get metrics from native projects ?

Thank you very much.

CTZStef
  • 1,675
  • 2
  • 18
  • 47

1 Answers1

0

Change your project properties to "Use Common Language-Runtime (/clr)".

This will cause the compiler to emit .NET metadata for functions and variables in the program, and the profiler/analyzer relies on this metadata.

Sometimes the metadata is less complete for standard C++ code than for .NET types. And you surely don't want to rewrite everything over to C++/CLI, managed types, .NET runtime, garbage collection.

But trying a compile with /clr enabled shouldn't hurt anything.

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720