Rem0o/FanControl.HWInfo

Could not load file or assembly 'FanControl.HWInfo.dll' or one of its dependencies. Operation is not supported

RockZors opened this issue · 3 comments

Getting this error when refreshing sensors in FanControl.

I have versions below
V153 of FanControl
V 7.42-5030 if HW Info
V 1.3 of FanControl.HWInfo

I put the contents of release.zip in the /Plugins folder, unblocked both FanControl.Plugins.dll and FanControl.HWInfo.dll

When I go to refresh sensor detection in FanControl I get the failed to load plug from FanControl.HWInfo.dll. 'Make sure the plugin's dll is unblocked in its properties' error. I did go into HW info and enable the sensors i wanted for report in gadget.

Looking at the logs I get this error:

4/6/2023 12:47:29 PM: System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
4/6/2023 12:47:54 PM: Failed to load plugin FanControl.HWInfo.dll. Make sure the plugin's dll is unblocked in its properties.
4/6/2023 12:47:54 PM: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\kylec\Downloads\FanControl_net_7_0\Plugins\FanControl.HWInfo.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\kylec\Downloads\FanControl_net_7_0\Plugins\FanControl.HWInfo.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at FanControl.Domain.PluginService.LoadAssembly(FileInfo dll)

Checked what version of .net im using.

PS C:\Users\kylec> Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version

PSChildName Version


Client 4.8.09032
Full 4.8.09032
Client 4.0.0.0

Rem0o commented

You are using a net 7.0 release, only 4.8 works with plugins.

I donnt see any signs of dotnet 7 being used above, so how do you figure that?

I have the same problem, but my client is "Version 173 (NET 4.8) "!

The response from the above command is as follows

PSChildName Version


v2.0.50727 2.0.50727.4927
v3.0 3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation 3.0.6920.4902
v3.5 3.5.30729.4926
Client 4.8.09032
Full 4.8.09032
Client 4.0.0.0