hexagon-oss / openhardwaremonitor

Open Hardware Monitor - a tool for monitoring hardware performance. Includes support for various temperature sensors, disk I/O ratings and power consumption.
Mozilla Public License 2.0
188 stars 21 forks source link

Issue when using DLL for NBFC #54

Closed dd871 closed 12 months ago

dd871 commented 12 months ago

I found this repo when looking for an Openhardwaremonitor DLL that supports Raptor Lake.

After some updates (see below), I was able to compile it succesfully and dropped the DLL into the 'newest' NBFC plugins folder.

This does not work though, as I am getting this error everytime I try to run the service: Service cannot be started. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, Metadata...

I do not know much about programming, but it sounds like the DLL is now using a NET 6.0 library whilst NFBC is using some older version and hence it does not work?

What did you do to work around this?

Thanks!

PS: Had to update the Intel CPU file with the designation for my Raptor Lake CPU (0xBF):

              case 0xB7: // Raptor lake family
          case 0xBF:
              case 0xBA:
dd871 commented 12 months ago

Also, Openhardwaremonitor (as a compiled application) itself runs perfectly fine, the issue is just when I try to use the DLL for NBFC.

pgrawehr commented 12 months ago

Yea, this does look like a compatibility issue. But what is NFBC? Doesn't tell me anything.

dd871 commented 12 months ago

Yea, this does look like a compatibility issue. But what is NFBC? Doesn't tell me anything.

oh gosh, sorry. I think I accidentally went to the wrong Openhardwaremonitor fork. The one I was meaning to post to forked it only to be used with Notebook Fan Control, which uses the DLL as part of its plugins. Will close this one.