Running w/o registering PartCover.CorDriver

RickyAH
2008-11-06
2013-04-29
  • RickyAH
    RickyAH
    2008-11-06

    Is it possible to run PartCover withour registering PartCover.CorDriver.dll?

    I get the error:
    Error al recuperar un generador de clases COM para el componente con CLSID {FB20
    430E-CDC9-45D7-8453-272268002E08} debido al siguiente error: 80040154.
       en PartCover.Framework.Connector..ctor()
       en PartCover.ApplicationEntry.Main(String[] args)

    which could be roughly translated to
    Error recovering a generator for COM classes for the component with CLSID {FB20
    430E-CDC9-45D7-8453-272268002E08} due to the following error: 80040154.
       in PartCover.Framework.Connector..ctor()
       in PartCover.ApplicationEntry.Main(String[] args)

     
    • Dan Ports
      Dan Ports
      2008-11-06

      No, PartCover.CorDriver.dll must be registered when running PartCover. This is due to the way in which the .NET profiler API works. See http://www.blong.com/Conferences/DCon2003/Internals/Profiling.htm for more information on the profiler API.

       
      • RickyAH
        RickyAH
        2008-11-06

        Oh, thats a pity :(
        Thanks for the quick response and for the useful information.

         
        • Dan Ports
          Dan Ports
          2008-11-06

          Well, it is not difficult to register it on the fly if that's the problem you're having. For example, this is what I use to run PartCover in my CruiseControl.Net MSBuild scripts:

              <Exec WorkingDirectory="$(MSBuildProjectDirectory)\tools\PartCover"
                  Command="regsvr32 /s PartCover.CorDriver.dll" />
              <Exec WorkingDirectory="$(BuildPath)"
                  Command="$(MSBuildProjectDirectory)\tools\PartCover\PartCover.exe --target=..\tools\NUnit\nunit-console.exe [blah blah blah]" />
              <Exec WorkingDirectory="$(MSBuildProjectDirectory)\tools\PartCover"
                  Command="regsvr32 /s /u PartCover.CorDriver.dll" />

          Would be nice to roll this into an MSBuild task or have PartCover.exe itself register the profiler COM class before launching the target process.

           
          • RickyAH
            RickyAH
            2008-11-07

            My problem is that I can't register the DLL without administrative privilegies, which I don´t have at work.

            I'm setting up a build script using NAnt for work and home, and I wanted to include some code coverage. I'll try it at home anyway.

            Thanks again!