NCover Frequently Asked Questions
- What programming languages does NCover support?
- Does NCover support C, C++, or JAVA?
- Does NCover support the .NET Compact Framework?
- Which versions of the .NET Framework does NCover support?
- Does NCover support Silverlight?
- Does NCover support Mono?
- Does NCover support WCF, WF, WPF, WinForms, ASP.NET, or ASP.NET MVC?
- Does NCover support ASP.NET or ASP.NET MVC?
- Does NCover support 64-bit programs?
- Does NCover support 32-bit programs on 64-bit computers?
- Does NCover support emulators?
- Can I exclude anonymous types?
- Does NCover support Fakes?
What programming languages does NCover support?*
NCover supports any programming language that runs on the .NET Framework Common Language Runtime and conforms to the CLI specification. Although there are many languages that meet those criteria (Wikipedia has a list here), the most widespread .NET languages are C#, VB.NET, and C++/CLI.
Does NCover support C, C++, or Java?
C and C++ traditionally compile directly to machine code, not the Common Intermediate Language (CIL), so NCover is unable to cover code written in either C or C++. However, Microsoft ships a C/C++ compiler that is capable of compiling C/C++ to CIL, and calls the resulting language "C++/CLI". NCover can cover C/C++ code that has been compiled to C++/CLI.
NCover cannot cover native C++, but it can profile managed C++ code.
Java compiles to the Java bytecode and runs on the Java Virtual Machine, hence NCover cannot cover Java code. However, the IKVM.NET project is an implementation of Java/the Java Virtual Machine that runs on the .NET Framework, and NCover can cover programs compiled with IKVM.NET.
Does NCover support the .NET Compact Framework?
Yes, NCover can cover applications written against the .NET Compact Framework, as long as the application is run as a stand-alone application, and not within an emulator or on a mobile device.
Which versions of the .NET Framework does NCover support?
NCover supports all versions of the .NET Framework that Microsoft has released and still supports. Currently, this includes .NET 1.1 (.NET 1.0 is unsupported), .NET 2.0, .NET 3.0, .NET 3.5, .NET 3.5 SP1, .NET 4.0, and .NET 4.5.
NCover 3 does not support .NET 4.5, and no support for future .NET versions is planned.
Does NCover support Silverlight?
NCover supports coverage of Silverlight 4 and up. NCover profiles Silverlight by monitoring the application that is hosting the Silverlight runtime. This is usually the browser, for example, iexplore.exe or chrome.exe.
Please note that -- since iexplore, for example, is not a .NET process -- browsers cannot be auto-detected or profiled until a Silverlight application is loaded.
NCover does not support applications running on the Mono Framework. However, applications that run on the Mono Framework should be able to run on the .NET Framework when executed on a Windows OS. Once the application runs on the .NET Framework (it might need to be recompiled) NCover can cover the application.
If you do need to cover an application that runs on the Mono Framework, then Mono has several code coverage tools available. You can check them out here.
Does NCover support WCF, WF, WPF, and WinForms?
NCover supports each of the above frameworks. In particular, NCover supports WCF whether its hosted in IIS, in a Windows Service, or in a standard (Console or GUI) application. NCover also supports WPF and WinForms, although the auto-generated code in each framework sometimes leads to interesting covered/uncovered highlights.
Does NCover support ASP.NET or ASP.NET MVC?
NCover supports both standard ASP.NET and ASP.NET MVC, whether the code is tested through a unit testing tool or through a web interface.
Does NCover support 64-bit programs?
The 64-bit NCover installer (only for 64-bit computers and operating systems) offers full support for 64-bit programs.
NCover automatically profiles at either bitness level -- this means you don't have to pick which profiler to run, and processes that switch bitness can still be covered in one profiling session.
Does NCover support 32-bit programs on 64-bit computers?
The 64-bit NCover installer comes with full support for 32-bit programs, provided through a minimal install (into C:\Program Files (x86)\NCover) of core NCover technology tuned to cover 32-bit programs.
NCover automatically profiles at either bitness level -- this means you don't have to pick which profiler to run, and processes that switch bitness can still be covered in one profiling session.
Does NCover support emulators?
NCover can profile code that is run in a .NET framework, but testing a UI for a mobile device, for example, in an emulator is not supported. See question three for more details
Can I exclude anonymous types?
NCover reports the metadata as it's created by the .NET framework. If you were to use Reflector or a similar tool, we expect you'd see the same naming conventions displayed.
The dev team has considered the idea of providing some help in interpreting the way .NET displays the code generated by closures, lambdas, and anonymous functions, but for now, NCover is displaying what the compiler generates.
However, You should be able exclude anonymous types if you decode the naming convention and build the pre-coverage filter rules accordingly.
This kind of code is often displayed as methods, so we suggest an exclude at that level, such as a pre-coverage filter like: "Exclude","Module","Starts With","<>f__AnonymousType"
Also try excluding the attribute that should be attached to this kind of code: "Exclude","Attribute","Contains","CompilerGeneratedAttribute"
Does NCover support Microsoft Fakes?
NCover does not currently support Microsoft Fakes. NCover and Fakes both use the Microsoft profiling API, and this conflict blocks coverage collection.