Which version(s) of Visual studio

Which version(s) of Visual studio

Which version (or versions) of Visual Studio is NCOVER for?


Re: Which version(s) of Visual studio

NCover works with all versions of the .NET framework, so it is not tied to a particular version of Visual Studio.  See TestDriven.Net for more information about Visual Studio integration.


Re: Which version(s) of Visual studio

When invoking NCover.Console.exe Version 1.5.2.0 I get error message 'To run this application, you must first install one of the follwoing versions of the .NET Framework: v2.0.50727'. I wish to run NCover with Version v1.1.4322 of the .NET framework. Does NCover 1.5.2.0  run on v1.1.4322 of the .NET Framework? If so, how?

Thanks

Andy


Re: Which version(s) of Visual studio

NCover 1.5.x (1.5.4 is the recomended version) does support all versions of the .NET framework.  There are two fraemwork versions you have to keep in mind.  The NCover.Console program itself does require .NET 2.0 to run, but when it profiles your program, your code will run under whatever version of the framework it was compiled with.  So, you must have the .NET 2.0 framework on your machine (just download it from MS), but your .NET 1.1 programs will still be profiled under the 1.1 runtime.


Re: NCoverLib registration

Coverlib.dll is the correct dll, there is no such dll named NCoverLib.

Make sure DbgHelp.dll is in the directory with CoverLib.dll when you register it.


Re: NCoverLib registration

Confirm: Dbghelp.dll is in the same directory.

Meanwhile I have tried to get things up and running.  Regsvr32 still does not work !
I installed a trial version of COM Explorer, which told me that CoverLib.dll needs two other DLLs that are not in the distribution (MSVCR80.DLL and MSVCP80.DLL).  I copied them from a place where I found them.  COM explorer succeeded in registering the DLL. (as mentioned before regsvr32 fails doing this - why ?)

I managed to get IIS and aspnet_wp running and got a log.
Then when I ended my internet explorer, the ASP worker process keeps running as it does not know anything about my actions.  NCover just keeps running as well, having only a log file. (xml file keeps empty, no html report created)

How should I take action so that the ncover console starts reporting to XML or HTML ?

Thanks for your views


Re: NCoverLib registration

Maybe I found the answer to the registration problem: it is on the forum.
I am running Windows 2000, so this might just be the answer.  If the version mentioned in the message is the answer, then why is version 5.1.2600.2180 in the distribution ?  Is this the recommended version ?


Re: NCoverLib registration

This should be fixed now. <fingers crossed="true"/>


Re: NCoverLib registration

I still can't get it to register on a Win2k Pro box.  1.3.3 registers just fine on the same machines.  This is from the installed directory, so the 80 DLLs, as well as dbghlp.dll are there.  I also tried using a newer dbghlp.dll...no dice.


Re: NCoverLib registration

I believe 1.5.4 fixes this problem.


Re: Hanging

Not sure if this is related.  If the application you are profiling starts another process then NCover seems to hang.  The second process does not seem to quit.

I did a quick test, where NCover runs a console application that does nothing apart from starting another console app and waiting for it to quit:

    class MainClass
    {
        public static void Main(string[] args)
        {
            Process p = Process.Start(@"ConsoleTest.exe");
            p.WaitForExit();
        }
    }

The second console app does nothing at all, is a simple console app that just quits.  NCover kicks off the first console app, then the second app is started, but the second app never finishes.  Killing the second process allows NCover to finish.

Now, when NAnt compiles the code it uses Process.Start with the Csc compiler, for example, so maybe it is the same problem?


Re: Hanging

I was able to add a task in my nant script to run ncover on nunit and was successful.  Now I just run nant on the build file and am able to view the output xml file in ncover-expplorer.


Re: Hanging

I have the same problem with 1 NUnit test that is runnin in NAnt. If do the same thing in a console window, I observer the same. If I kill nunit-console, my NAnt script continues...


Re: Hanging

Oh, I've met the same problem while running NUnit tests. So it is a bug? Is there any way to make NCover properly finish it's work on NUnit tests which start new processes?? In case of manual stopping nunit-console process,  report generated by NCover is incomplete and almost useless... Moreover, I'm not aple to manually stop nunit-console cause it is supposed to work under NAnt on the server. I'll be gratefull for any help...


Re: Hanging

I believe Peter fixed this problem in the 1.5.3 release.


Re: Ctrl+F to open find dialogue for code pane

Hi Thomas,

Find capability is certainly on my hit list. In an ideal world I would love to implement something like what Lutz does in Reflector in terms of the Search functionality he has which filters a list of all the classes as you type. Resharper has something similar.

I hadnt thought about searching within the code pane at all but that makes sense - do you mean to navigate to a method or a true search to include comments and code etc?


Re: Ctrl+F to open find dialogue for code pane

Hi Grant,

I mean a "real" search. The naviagation is also possibly using the tree view.

Ciao
Thomas


Re: Ctrl+F to open find dialogue for code pane

Hi Thomas,

I have just implemented for the 1.3.6 release a "Find Type" dialog which is similar to Resharper/Reflector. This is I think the most useful part of the find functionality to allow people to quickly jump to a class.

I have not however attempted a "find within the source code" at this point, perhaps in a future release. The problem is the ICSharpCode text editor does not expose anything directly to support this, and I am reluctant to drag in more code/write a whole lot on top of this as I want to move away from this control at some point soon. The GPL license requirement is a pain in the a$$ and too much of a hassle for some people whose companies are scared of having any GPL software present in their development cycle.


Re: Printing error

Shocking... a great example of what can happen when you add print functionality but don't have a printer on your PC you develop it on!

To get it to work you have to have the source code tab open (it just prints the contents of the specific source code window).

I will make a fix and push a build up tonight - thanks for reporting the error.


Re: Printing error

This has been fixed in build 1.3.5.1921 of NCoverExplorer, which is available from my website.


Re: While Running the NCoverExplorer, App setting is not able to

Did you remember to use the /config switch in your command line?


Re: While Running the NCoverExplorer, App setting is not able to

The /Config switch is not helped me. Do I need to do some setting in NCoverExplorer ?

My config file is present in my workingfolder <ProjectName>.dll.config

Am I missing anything, help needed.

C:\>"C:\Program Files\NCover\NCover.Console.exe" //w "C:\Binaries\Server" //x "C:\NCover\NCoverExplorer\Report.xml" //a ServerManager "C:\NunitBin\bin\nunit-console.exe" ServerManager.dll ServerManagerUnitTest.dll  /config=C:\MotoCAD\MCADCode\Binaries\Server\ServerManagerUnitTest.dll.config

Above is the command I am running.

 


Re: While Running the NCoverExplorer, App setting is not able to

Firstly - the command line you show running from the C-drive prompt - is that or is that not working? I would imagine you should get rid of the "ServerManager.dll" bit of the command line - the name of the .dll containing your unit tests is correctly specified following that.

Your best bet to getting this working is to break it down as follows:

1. Get the nunit-console.exe bit of the command line working in isolation. If you can't get this working you have an issue with how you are using NUnit - in which case posting to the NUnit forums would be a better place for help:

"C:\NunitBin\bin\nunit-console.exe" ServerManagerUnitTest.dll  /config=C:\MotoCAD\MCADCode\Binaries\Server\ServerManagerUnitTest.dll.config

2. Once you have your NUnit command line working, then get it working under NCover by prefixing it with the NCover arguments:

"C:\Program Files\NCover\NCover.Console.exe" //w "C:\Binaries\Server" //x "C:\NCover\NCoverExplorer\Report.xml" //a ServerManager COMMANDS_FROM_STEP1

Note that this is going to just produce an NCover xml coverage file, nothing to do with NCoverExplorer at this point. I point this out as you call it "Report.xml" - this is really just a coverage.xml not a report as such (although it can be viewed as a very basic report using the xsl that NCover ships with).

3. Once you have that working, then you can add NCoverExplorer into the mix. If you want to run the NUnit tests with coverage from within NCoverExplorer, then the command line is the same as in step 1. If you want to automate NCoverExplorer to convert the coverage.xml into a "pretty" report, then you will automate NCoverExplorer.Console.exe as a separate step after running NCover, giving it as input the output xml from NCover - in your case Report.xml