1

I have a Winforms solution MySolution.exe having inside a MyControl.dll that I want to profile.

When I try to run the performance profiling tool in VS 2010 on it it gives me the following warning

MyControl.dll is signed and instrumenting it will invalidate its signature. If you proceed without a post-instrument event to re-sign the binary it may not load correctly.

after that the same warning with the MySolution.exeis signed...

Now, if I choose the option to continue without re-signing the profiling starts solution crashes and nothing finally happens.

I saw some similar solutions, but dind't understand how to apply the provided solution in a WinForm solution.

Say, I have MySolution.exe and the dll to profile is MyControl.dll... both, the solution and the project are signed with a key MyKey.snk

Community
  • 1
  • 1
serhio
  • 28,010
  • 62
  • 221
  • 374

1 Answers1

0

As you point out the answer is in the question you have highlighted.

What you need to do is resign the 'modified' assembly using a post build step. You will find the place to add this under Build Events when you look at the Properties of the project.

sn -R < path to assembly > < path to key >

Alternatively you could disable signature verification (as also suggested) completely using

sn -Vr *

If the latter works this would be simpler and then you just need to remember to re-enable signature verification once you have finished profiling.

sn -Vx

Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56