joi, 11 februarie 2010

How to be able to debug an assembly that it is registered in the GAC?

  1. Go to the project for the assembly that you want to debug.
  2. Add a .snk file (created by sn –k [filename].snk at a “Visual Studio 2005 Command Prompt”)
  3. Modify the project setting to Sign the Assembly on the Signing tab.
  4. Modify the project settings to add the following build events on the Build tab:

    "$(DevEnvDir)..\..\SDK\v2.0\bin\gacutil" /u "$(TargetName)"
    "$(DevEnvDir)..\..\SDK\v2.0\bin\gacutil" /i "$(TargetPath)"
    copy "[Assembly Debug Path]\*.pdb" "c:\WINDOWS\assembly\GAC_MSIL\"$(TargetName)"\[AssemblyVersion]__[AssemblyPublicKey]\"
  5. In Debug tab set "Star external program:" and "Working directory:".
  6. Press F5

Niciun comentariu:

Trimiteți un comentariu