System.InvalidOperationException

System.InvalidOperationException

Hi,

I am running into following problem, whenever I run nCover, any suggestions

Thanks

---------------------------
NCoverExplorer Error
---------------------------
An unexpected error has occurred.

If you are able to replicate it please send an e-mail to:

   NCoverExplorer@kiwidude.com.

 

(You can copy and paste the text from the dialog using Ctrl+C)

 

Sadly this is too severe to continue... please restart and try again.

 

System.InvalidOperationException: There is an error in XML document (0, 0). ---> System.Xml.XmlException: The root element is missing.

   at System.Xml.XmlTextReader.Read()

   at System.Xml.XmlReader.MoveToContent()

   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read6_NCoverExplorer()

   --- End of inner exception stack trace ---

   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)

   at System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader)

   at NCoverExplorer.Core.Configuration.ExplorerConfiguration._ReadConfigurationFile()

   at NCoverExplorer.Core.Configuration.ExplorerConfiguration..ctor(CommandLineOptions commandLineOptions, String configFileName)

   at NCoverExplorer.EntryPoint.Main(String[] args)
---------------------------
OK  
---------------------------

 


Re: Where can I find NCover zip(not msi, but zip)???

Hi Dean,

As you may have noticed from the files page Peter does not distribute NCover as just a zip file.

The .msi doesn't do anything clever apart from registering coverlib.dll - so just use it to install on one machine, then copy the contents of C:\Program Files\NCover to your shared tools folder or whatever setup you have. The only thing you have to remember is to manually do a regsvr32 of coverlib.dll on each developer's machine - usually as part of your NAnt script for instance.

One thing to note - if you are using Jamie Cansdale's TestDriven.Net addin then NCover must be installed in C:\Program Files\NCover also, although I know the latest builds (not yet publicly released) have NCover as part of the installation.

As for your point on FireFox - I post here all the time with FireFox 1.5.0.7 currently and it is possible. I agree however there are a number of things which don't work very well - for instance perhaps what confused you was that there is no blinking cursor when you first click in the new message textbox. Just start typing and it will appear. I did send an e-mail to Peter a few days ago asking if when he gets a chance he looks into whether a later version of the forum software he uses is available - although given his limited time I am sure we would rather he spend it resolving a few known issues for NCover 1.5.6!


Re: Where can I find NCover zip(not msi, but zip)???

sweeeet, thanks for the response.

Why does the coverlib.dll have to be registered?  What happens if I have different projects using different versions of NCover and I want to run both projects?  Will this work(I have had this happen in Java with emma code coverage tool and it worked great with emma.....there is no registration of emma).  It would be really cool if registration was optional and only needed by certain programs like TestDriven.Net.

PS. yes, you were right....the no cursor in firefox tricked me. 
thanks,
dean


Re: Where can I find NCover zip(not msi, but zip)???

The technical reasons why coverlib.dll has to be registered is a question for Peter - there is something about the way he does his profiling that requires a COM registration of that dll.

Jamie and I figured out a fairly trivial and simple way of doing it that I implemented in both NCoverExplorer (for the NCover runner dialog) and my NCover NAnt/MSBuild tasks, that involves creating and removing the entries from the registry on the fly (does not require local admin rights and works on all operating systems). I think Jamie has given this code to Peter so fingers crossed it makes it into the NCover 1.5.6 release. Once that is done then NCover will truly be an xcopy deploy style application.

As for when you have multiple NCover versions, you can as I intimated earlier include a regsvr32 <exec> task in your NAnt/MSBuild scripts which will ensure that the CoverLib.dll for the appropriate version of NCover is registered. Alternatively use my <NCover> NAnt/MSBuild tasks which will do this automatically for you.