locked
Code Coverage - Windows Service with Instrumented dlls is throwing System.DllNotFoundException

    Question

  • Hello,

    I have build .net windows serivce and deployed the service is working fine. to get the code coverage I have instumented the dlls using

    vsinstr /coverage <assembly> and replaced dlls , pdb and .instr.pdb files in the windows service folder.

    started the service it is throwing below error. Thanks in advance.

    =================

    Application: MyWindowsService.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.DllNotFoundException

    Stack:

    at Microsoft.VisualStudio.Coverage.Init_c4649c044818db5e0fa04f8dfada71c6.VSCoverRegisterAssembly(UInt32[], System.String)

    at Microsoft.VisualStudio.Coverage.Init_c4649c044818db5e0fa04f8dfada71c6.Register()

    at myservice.Program.Main(System.String[])

    -----------------------------


    Ram
    Thursday, September 29, 2011 8:40 AM

Answers

  • Hi Ram,

    How about this issue going on? Did any replys could help?

    If there's any concern, please feel free to let me know.

    Sincerely,


    Jack Zhai[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, October 05, 2011 9:22 AM

All replies

  • Hello,

    I have build .net windows serivce and deployed the service is working fine.  to get the code coverage I have instumented the dlls using

    vsinstr /coverage <assembly>  and replaced dlls , pdb and .instr.pdb files in the  windows service folder.

     started the service  it is throwing  below error.  Thanks in advance.

    ================= 

    Application: MyWindowsService.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.DllNotFoundException

    Stack:

    at Microsoft.VisualStudio.Coverage.Init_c4649c044818db5e0fa04f8dfada71c6.VSCoverRegisterAssembly(UInt32[], System.String)

    at Microsoft.VisualStudio.Coverage.Init_c4649c044818db5e0fa04f8dfada71c6.Register()

    at myservice.Program.Main(System.String[])  

    -----------------------------


    Ram
    Thursday, September 29, 2011 8:35 AM
  • Hi,

    Maybe you can use this tool to have a check, see http://docs.ncover.com/how-to/code-coverage-of-windows-services/.

     

    Xuan

    Friday, September 30, 2011 6:47 AM
  • Hello Ram,

    I am writing to check the status of the issue on your side.

    How about this problem going on now? Would you mind letting us know the result of the suggestions.

    In addtion,See this blog:Code Coverage using Visual Studio 2008’s Code Coverage tools. It said that how to get Windows Service code coverage. Hope it helps.

    Thanks,


    Jack Zhai[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, October 03, 2011 2:57 AM
  • I am still working on I am getting Zeros the code coverage result.

    I am following the steps mentioned in blog:Code Coverage using Visual Studio 2008’s Code Coverage tools.

    I will try again and post the  update


    Ram
    Monday, October 03, 2011 6:41 PM
  • Hi Ram,

    How about this issue going on? Did any replys could help?

    If there's any concern, please feel free to let me know.

    Sincerely,


    Jack Zhai[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, October 05, 2011 9:22 AM
  • hey it worked with the steps you have provided..

     

    Thanks

    Ram


    Ram
    Thursday, October 06, 2011 12:11 AM
  • Verified with mentioned steps and its working .. Thank you..

    Ram


    Ram
    Thursday, October 06, 2011 12:11 AM