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