locked
VS tries to instrument 3rdParty library in ASP project RRS feed

  • Question

  • Hi All,
    I'm using a 3rd party lib in an asp mvc 3 project. If code coverage is enabled vs tries to instrument this library and i get the following warning:
    Instrumentation warning: Cannot re-sign instrumented binary [x] with the key file [y]. Public key does not match.
    Same library in other (non) asp projects works fine with code coverage.
    Test run will then fail completely with following message in windows application log:
    Exception message: Could not load file or assembly [x] or one of its dependencies. Strong name signature could not be verified.  The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
    • Moved by Mike Dos Zhang Friday, January 20, 2012 8:02 AM asp.net topic (From:Visual Studio Performance Tools (Profiler))
    Friday, January 6, 2012 2:01 PM

All replies

  • Use this command to verify the strong name: sn -v assemblyname.

    If this cannot solve it, then try to increasing the assembly's trust level: http://msdn.microsoft.com/en-us/library/2bc0cxhc(VS.80).aspx

    --> Test run will then fail completely

    Do you mean the asp.net project even cannot run, not just cannot be calculated the code coverage, right?

    If so, I think you will need to use this forum if the above two methods cannot solve this problem.

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

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Monday, January 9, 2012 3:24 AM
  • Hi, thank you for your answer.

    I validated the assembly, with the described method, it seems to be valid.

    Although we have numerous other (non asp) projects use this assembly without problems.

    I faild changing the trust level, since mscorcfg.msc is missing on my machine. Its all dotnet4 anyway and the mentionioned article states that this tool has been removed in dotnet 4.

    Ill try to ask at the forum you pointed at, thank you very much!

     

    Wednesday, January 11, 2012 8:26 AM
  • You're welcome!

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, January 11, 2012 8:50 AM