To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!Enab...

Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

https://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net

Add the following values to

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\)

Make sure you include the backslash after the folder name and that the Folder exists.

You need to restart the program that you're running to force it to read those registry settings.

BTW, don't forget to turn off fusion logging off when not needed.  

 

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

 

你可能感兴趣的:(To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!Enab...)