FanControl.CorsairLink icon indicating copy to clipboard operation
FanControl.CorsairLink copied to clipboard

Add support for .NET 8 build of Fan Control

Open ChaseDDevelopment opened this issue 2 years ago • 15 comments

Hey there,

I am having the same behaviour as in issue (#2), though I believe it's a different exception:

I've attached the logs.
I've tried the latest Release (v 1.0.0) as well as the latest beta release.

I have ensured both zip's and dll's are unblocked as per the instructions. Please let me know if I can help in any way.

Corsair Commander PRO could not initialize or has no sensors.
2/26/2023 12:10:12 PM: [CorsairLink] DeviceManager: Found 2 Corsair device(s)
  name=CORSAIR iCUE Commander CORE, devicePath=\\?\hid#vid_1b1c&pid_0c1c&mi_01#7&26ae1e37&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  name=CORSAIR iCUE Commander CORE, devicePath=\\?\hid#vid_1b1c&pid_0c1c&mi_00#7&2d6e075&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}

2/26/2023 12:10:12 PM: [CorsairLink] DeviceManager: Found 1 supported Corsair device(s)
  name=CORSAIR iCUE Commander CORE, devicePath=\\?\hid#vid_1b1c&pid_0c1c&mi_00#7&2d6e075&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}

2/26/2023 12:10:12 PM: [CorsairLink] An exception occurred attempting to initialize device 'CORSAIR iCUE Commander CORE (e20f10a0948871aa8559c2063091005f)' (\\?\hid#vid_1b1c&pid_0c1c&mi_00#7&2d6e075&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}):
2/26/2023 12:10:12 PM: [CorsairLink] System.TypeInitializationException: The type initializer for 'CorsairLink.Synchronization.CorsairDevicesGuard' threw an exception.
 ---> System.MissingMethodException: Method not found: 'Void System.Threading.Mutex.SetAccessControl(System.Security.AccessControl.MutexSecurity)'.
   at CorsairLink.Synchronization.CorsairDevicesGuard.CreateMutex()
   at CorsairLink.Synchronization.CorsairDevicesGuard..cctor()
   --- End of inner exception stack trace ---
   at CorsairLink.Synchronization.CorsairDevicesGuard.Acquire()
   at CorsairLink.Synchronization.CorsairDevicesGuardLock..ctor()
   at CorsairLink.Synchronization.CorsairDevicesGuardManager.AwaitExclusiveAccess()
   at CorsairLink.CommanderCoreDevice.RefreshImpl(Boolean initialize)
   at CorsairLink.CommanderCoreDevice.Connect()
   at FanControl.CorsairLink.CorsairLinkPlugin.FanControl.Plugins.IPlugin.Initialize()
2/26/2023 12:10:14 PM: [CorsairLink] DeviceManager: Found 2 Corsair device(s)
  name=CORSAIR iCUE Commander CORE, devicePath=\\?\hid#vid_1b1c&pid_0c1c&mi_01#7&26ae1e37&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  name=CORSAIR iCUE Commander CORE, devicePath=\\?\hid#vid_1b1c&pid_0c1c&mi_00#7&2d6e075&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}```

ChaseDDevelopment avatar Feb 26 '23 19:02 ChaseDDevelopment

Hi @ChaseDDevelopment, are you using the .NET Framework 4.8 build of Fan Control or the .NET 7 build?

EvanMulawski avatar Feb 26 '23 22:02 EvanMulawski

Hey @EvanMulawski I am using the .NET 7 build with runtime 7.0.3

ChaseDDevelopment avatar Feb 26 '23 22:02 ChaseDDevelopment

There isn't a .NET 7-compatible build yet, so the .NET Framework build of Fan Control is required (and somewhat recommended; most of the available plugins only target .NET Framework anyway). I'll add this to the README.

EvanMulawski avatar Feb 26 '23 22:02 EvanMulawski

@EvanMulawski you could create a multi-target (net48;net7) and use the FanControl.Plugin.dll from the net48 and net7 release with a prefix to bundle both version if you want to do that.

Rem0o avatar Feb 28 '23 02:02 Rem0o

@EvanMulawski Just got finished trying the Framework build v147 and it worked like a charm. Much appreciated!!

As a note, I did have to stay on the v147 build as when prompted by Fan control to update to v148, the plugin broke.

ChaseDDevelopment avatar Mar 02 '23 01:03 ChaseDDevelopment

@ChaseDDevelopment Yeah, there's a problem with v148. See https://github.com/Rem0o/FanControl.Releases/discussions/1577#discussioncomment-5161062

EvanMulawski avatar Mar 02 '23 02:03 EvanMulawski

@ChaseDDevelopment Yeah, there's a problem with v148. See Rem0o/FanControl.Releases#1577 (comment)

No problem! Thanks for calling that issue out. Appreciate the work you've put into this, made sure One of the PC's in the house could have it's fans controlled nicely through corsair's core! This can be closed, unless you want it open for the enhancement.

ChaseDDevelopment avatar Mar 02 '23 02:03 ChaseDDevelopment

There isn't a .NET 7-compatible build yet, so the .NET Framework build of Fan Control is required (and somewhat recommended; most of the available plugins only target .NET Framework anyway). I'll add this to the README.

Isn't .NET 7 a .NET Framework? If .NET 7 is not a .NET Framework, that's confusing.

CalculonPrime avatar Mar 10 '23 08:03 CalculonPrime

Isn't .NET 7 a .NET Framework? If .NET 7 is not a .NET Framework, that's confusing.

@CalculonPrime Tell Microsoft. It is ;P

Rem0o avatar Mar 10 '23 15:03 Rem0o

Tried this with the latest version of .NET 8 of FanControl - didnt work - had to roll back to 4.8 I guess this is still not implemented yet right?

p1r473 avatar Mar 17 '24 06:03 p1r473

Tried this with the latest version of .NET 8 of FanControl - didnt work - had to roll back to 4.8 I guess this is still not implemented yet right?

Not yet - will be in v2.0 which is currently being designed.

EvanMulawski avatar Mar 17 '24 18:03 EvanMulawski

FanControl.Plugins.dll is netstandard2.0 by the way @EvanMulawski, so you can use the same for both.

Rem0o avatar Mar 17 '24 18:03 Rem0o

FanControl.Plugins.dll is netstandard2.0 by the way @EvanMulawski, so you can use the same for both.

All of my fans and pumps are run through core commanders. Without this plugin working with the .NET 8, I can't explore the software. I'd love to use this plugin, but it appears it is still incompatible with .NET 8.

I suppose it isn't being compiled against .NET Standard 2.0. I feel like this should be a relatively easy change to retarget the project? Can this be done so those of us on the latest can enjoy the plugin?

TannerBragg avatar Apr 30 '24 14:04 TannerBragg

I am working on multi-targeting - will be after v1.6.0 comes out of beta.

EvanMulawski avatar May 05 '24 02:05 EvanMulawski

Support added in v1.7.0-beta.1

EvanMulawski avatar Jun 04 '24 02:06 EvanMulawski