locked
Injection of runtime library failed

    Question

  • Hi.  I am trying to profile an application using the standalone command-line Visual Studio 2008 profiler.  I have followed all of the directions, but I still get this error and don't know what to do.

    I am not sure what other information I can provide.  I am running Visual Studio 2008 Professional with the standalone profiler, on Windows XP SP3.

    I do:
    vsprefclrenv /sampleon
    vsperfcmd /start:sample /output myapp.vsp /launch:.\myapp.exe

    I have looked online and found references to Antivirus being the problem.  I have disabled this and the problem still happens.

    Thanks,
    Dan

    Tuesday, January 24, 2012 11:36 PM

Answers

  • You will need to turn off all of the protection kind software on your this System, each software has the injection protection feature will also affect you.

    You can try to use a Virtual PC install a clean Windows XP System to test, it will work fine without this problem before you install some protection kind software on it.

    And we also cannot exclude the virus, the protection kind software can affect the system running, the virus also could have this feature.

    If you also want try to repair it, then I recommend you use this Process Monitor to monitor which libraries file will load into your application process, and according the libraries path find the software, then try to turn off it(or uninstall it if necessary). I mean the libraries which is not your application needed.

    Maybe you need a reboot for the system after you did some changes.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us


    Wednesday, January 25, 2012 5:01 AM
  • Sorry, I think the tool should be Process Monitor instead of the Process Explorer I mentioned.

    When you F5 debug your application, you can boot the Process Monitor to monitor your process, then it will print our what modules you're using.

    I have not used the antivirus software you talked, but base on my experience the Windows Defender will not have this affect to your problem.

    How about use the profiler tool form your Visual Studio IDE(this would be only support Developer and Team Edition Visual Studio2008)?

    Please also ensure your assembly build platform target is matched the profiler tool(there're x86 and x64 version):

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Team Tools\Performance Tools

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Team Tools\Performance Tools\x64

     


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Thursday, January 26, 2012 9:08 AM

All replies

  • You will need to turn off all of the protection kind software on your this System, each software has the injection protection feature will also affect you.

    You can try to use a Virtual PC install a clean Windows XP System to test, it will work fine without this problem before you install some protection kind software on it.

    And we also cannot exclude the virus, the protection kind software can affect the system running, the virus also could have this feature.

    If you also want try to repair it, then I recommend you use this Process Monitor to monitor which libraries file will load into your application process, and according the libraries path find the software, then try to turn off it(or uninstall it if necessary). I mean the libraries which is not your application needed.

    Maybe you need a reboot for the system after you did some changes.


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us


    Wednesday, January 25, 2012 5:01 AM
  • Is there some sort of diagnostic I can run to see what's causing the issue?  I'm not exactly sure what Process Explorer is supposed to tell me.  Can you give me an example?

    Does Windows Defender cause this problem?  Antivirus software is ubiquitous -- Winodws yells at you if you don't have it -- and is something that Visual Studio should expect, and work with. 

    Regards,
    Dan

    Wednesday, January 25, 2012 10:47 PM
  • Sorry, I think the tool should be Process Monitor instead of the Process Explorer I mentioned.

    When you F5 debug your application, you can boot the Process Monitor to monitor your process, then it will print our what modules you're using.

    I have not used the antivirus software you talked, but base on my experience the Windows Defender will not have this affect to your problem.

    How about use the profiler tool form your Visual Studio IDE(this would be only support Developer and Team Edition Visual Studio2008)?

    Please also ensure your assembly build platform target is matched the profiler tool(there're x86 and x64 version):

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Team Tools\Performance Tools

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Team Tools\Performance Tools\x64

     


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Thursday, January 26, 2012 9:08 AM
  • I am writing to check the status of the issue on your side. 
    What about this problem now? 
    Would you mind letting us know the result of the suggestions?

    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, February 01, 2012 6:49 AM