1.以管理員身份運行vs命令提示符html
2.運行 fuslogvwshell
3.以管理員身份運行Powershell ide
To Enable:(確保fusion日誌的文件夾D:\FusionLog\的存在)post
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog -Value 1 -Type DWord Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures -Value 1 -Type DWord Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds -Value 1 -Type DWord Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath -Value 'D:\FusionLog\' -Type String
To Disablethis
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath
相似,註冊表設置:url
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion Add: DWORD ForceLog set value to 1 DWORD LogFailures set value to 1 DWORD LogResourceBinds set value to 1 DWORD EnableLog set value to 1 String LogPath set value to folder for logs (e.g. C:\FusionLog\)
目的,實現功能:日誌
查看
運行程序=》打開Fuslogvw.exe刷新,選中須要的,查看
相關連接:
Fusion Logcode
How to enable assembly bind failure logging (Fusion) in .NEThtm
I usually use the Fusion Log Viewer (Fuslogvw.exe from a Visual Studio command prompt or Fusion Log Viewer from the start menu) - my standard setup is:blog
c:\FusionLogs
(Important: make sure that you have actually created this folder in the file system.)Remember to turn of logging off once you're done!
You can run this Powershell script as administrator to enable FL:
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog -Value 1 -Type DWord Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures -Value 1 -Type DWord Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds -Value 1 -Type DWord Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath -Value 'C:\FusionLog\' -Type String
Note: Ensure that the directory provided for the LogPath entry exists. If the directory does not exist, then your logs will not be retrievable.
and this one to disable:
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath