How to enable assembly bind failure logging (Fusion) in .NET

后端 未结 13 2855
难免孤独
难免孤独 2020-11-21 04:50

How do I enable assembly bind failure logging (Fusion) in .NET?

13条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-21 05:33

    For those who are a bit lazy, I recommend running this as a bat file for when ever you want to enable it:

    reg add "HKLM\Software\Microsoft\Fusion" /v EnableLog /t REG_DWORD /d 1 /f
    reg add "HKLM\Software\Microsoft\Fusion" /v ForceLog /t REG_DWORD /d 1 /f
    reg add "HKLM\Software\Microsoft\Fusion" /v LogFailures /t REG_DWORD /d 1 /f
    reg add "HKLM\Software\Microsoft\Fusion" /v LogResourceBinds /t REG_DWORD /d 1 /f
    reg add "HKLM\Software\Microsoft\Fusion" /v LogPath /t REG_SZ /d C:\FusionLog\
    
    if not exist "C:\FusionLog\" mkdir C:\FusionLog
    

提交回复
热议问题