locked
Profiling a signed assembly in VS2012 RRS feed

  • Question

  • I have a very simple app set which is signed and I'm trying to instrument the assembly to do profiling. I've added the following command line to the Post-Instrument Events for the assembly.

    "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe" -R "C:\Dev\WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.exe" "C:\Dev\WpfApplication1\WpfApplication1\Test.snk"

    I start the profiling but it quickly completes without actually running my app. If I unsign my assembly and remove the post instrumentation event, the app runs and the profiler works as expected.

    Here's the contents of the output window. What have I done wrong.

    Profiling started.
    Instrumenting C:\Dev\WpfApplication1\WpfApplication1\obj\Debug\WpfApplication1.exe in place
    Info VSP3049: Small functions will be excluded from instrumentation.
    Microsoft (R) VSInstr Post-Link Instrumentation 11.0.50522 x86
    Copyright (C) Microsoft Corp. All rights reserved.
    File to Process:
       C:\Dev\WpfApplication1\WpfApplication1\obj\Debug\WpfApplication1.exe --> C:\Dev\WpfApplication1\WpfApplication1\obj\Debug\WpfApplication1.exe
    Original file backed up to C:\Dev\WpfApplication1\WpfApplication1\obj\Debug\WpfApplication1.exe.orig
    Warning VSP2001: C:\Dev\WpfApplication1\WpfApplication1\obj\Debug\WpfApplication1.exe is a strongly named assembly.  It will need to be re-signed before it can be executed.
    Successfully instrumented file C:\Dev\WpfApplication1\WpfApplication1\obj\Debug\WpfApplication1.exe.
    Running Post-Instrument Step
    Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.17626
    Copyright (c) Microsoft Corporation.  All rights reserved.
    Assembly 'C:\Dev\WpfApplication1\WpfApplication1\bin\Debug\WpfApplication1.exe' successfully re-signed
    Data written to C:\Dev\WpfApplication1\WpfApplication1120619(1).vsp.
    Profiling finished.
    File contains no data buffers
    File contains no data buffers
    Analysis failed
    Profiling complete.


    Ian Oakes www.trillian.com.au

    Tuesday, June 19, 2012 1:31 PM

Answers

  • Hi Ian,

    Sorry for my reply no help.

    To help you resolve this issue as soon as possible, you could submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com, Microsoft engineers will evaluate them seriously. If this issue is urgent, please contact support at http://support.microsoft.com.

    In addition, if possible, you could share us this project, please attach your Visual Studio project, you can upload it to the sky driver, and then share the download link in your post.

    I will vote the feedback submitted by you if I managed to reproduce this issue. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, June 27, 2012 8:46 AM
    Moderator

All replies

  • Hi Ian,

    Thank you for posting in the MSDN forum.

    I didn’t find the wrong steps, and maybe you could try to use Performance Wizard to check it. For detailed information and steps, see this KB “Instrumenting an signed assembly would throw warning message: "XXX.DLL/XXX.EXE has been signed. Instrumenting will break verification...."”.

    A blog about “Profiling Signed Assemblies”, it also told some information about it, if possible, you could refer it. Hope it could help.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, June 20, 2012 11:08 AM
    Moderator
  • Hi Ian,

    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 suggestion?

    Best Regard,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, June 26, 2012 2:24 AM
    Moderator
  • I have followed the steps as per the instructions in the links you have provided, but I'm unable to profile the assembly after resigning, in either VS2010 or VS2012.

    Ian Oakes www.trillian.com.au



    • Edited by Ian Oakes Tuesday, June 26, 2012 11:20 AM
    Tuesday, June 26, 2012 11:16 AM
  • Hi Ian,

    Sorry for my reply no help.

    To help you resolve this issue as soon as possible, you could submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com, Microsoft engineers will evaluate them seriously. If this issue is urgent, please contact support at http://support.microsoft.com.

    In addition, if possible, you could share us this project, please attach your Visual Studio project, you can upload it to the sky driver, and then share the download link in your post.

    I will vote the feedback submitted by you if I managed to reproduce this issue. Thanks for your understanding.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, June 27, 2012 8:46 AM
    Moderator