- Run "regsvr32.exe" on the appropriate NCover.Lib assembly listed below. IIS 5,6, and 7 are always 32-bit processes, so be sure to register the right NCover.Lib.
- 32-Bit Process: NCover.Lib.x86.dll, located in "C:\Program Files\NCover\".
- 64-Bit Process: NCover.Lib.x64.dll, located in "C:\Program Files\NCover\". On a 64-bit machine, NCover.Lib.x86.dll is located in "C:\Program Files (x86)\NCover\".
Make sure the user that runs the covered process has READ access to the file system directory that the NCover.Lib profiler assembly is located in. By default, ASP.NET in IIS runs as the ASPNET worker process. If you're trying to troubleshoot an existing issue, temporarily giving Everyone READ access to the directory or running IIS with full administrative permissions will mitigate this issue.
Make sure the user that runs the covered process has READ access to all appropriate registry keys.
Make sure that "msvcm90.dll", "msvcp90.dll" and "msvcr90.dll" are located in the same file system directory as the appropriate NCover.Lib assembly.
Download and install the "Process Explorer", "Process Monitor", and "DebugView" tools from Sysinternals. Process Explorer. Process Monitor. DebugView.
Run "Process Explorer", "Process Monitor", and "DebugView"
Run NCover in whatever configuration generated the "Failed to CoCreate Profiler" error. If the error happens when covering IIS, navigate to a web page on your localhost. Switch to "Process Explorer" and find the process that NCover should be covering. (For IIS 5, search for "aspnetwp.exe", and for IIS 6 or 7 look for "w3wp.exe"). Right-click on that process and select "Properties" from the popup menu. Go to the "Environment" tab in the resulting window, and make sure the "CorEnableProfiling" and "CORPROFILER" variables are set to the correct values (as shown below).
- (For NCover v3.3.2 and later) Switch to "DebugView" and look at the logged messages for NCover. If there are any messages other than "Entered Initialize()." and "Successfully executed the Initialize() method.", then send the entire log to the NCover support team along with a description of the problem.
Stop NCover. Verify that the "No Data was Collected" exception was thrown.
Switch to "Process Monitor" and stop collecting events by pressing "CTRL + E" on your keyboard, or by selecting "File -> Capture Events" from the menu. Next, filter the list so that it only shows events from the covered process. You can do this by selecting "Filter -> Filter ..." from the menu (see the picture below).
- Tell "Process Monitor" to only show events from the covered process by setting up the options as show in the screenshot below and clicking the "Add" button. The process name should match the name of the covered process. In the screenshot below, the process name matches the ASP.NET worker process name for IIS 5. If you're troubleshooting a problem in IIS 6 or 7, the ASP.NET worker process name is "w3wp.exe".
- Click the "OK" button to close the dialog and apply the filter, then select "Tools -> Registry Summary" from the menu. Look for a read to "HKCR\CLSID<GUID>\InprocServer32(Default)". If you don't see one, contact the NCover support team with a description of the problem and the steps you've taken so far to track it down (so they don't ask you to go through those same steps again).