mx0c / Corsair-Headset-Battery-Overlay

A transparent WPF overlay that displays the battery charge level of different Corsair headsets.
20 stars 5 forks source link

How to compile? #5

Closed unknwon00 closed 3 years ago

unknwon00 commented 3 years ago

tried loading the source in Visual Studio 19, but its complaining about a ton or errors.

mx0c commented 3 years ago

you have to probably install .net core 3.1

unknwon00 commented 3 years ago

i have net core 3.1 installed, still have the same errors

------ Build started: Project: VoidProOverlay, Configuration: Debug Any CPU ------ 1>C:\Program Files\dotnet\sdk\3.1.302\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets(349,5): warning NETSDK1107: Microsoft.NET.Sdk.WindowsDesktop is required to build Windows desktop applications. 'UseWpf' and 'UseWindowsForms' are not supported by the current SDK. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AssemblyInfo.cs(3,11,3,20): error CS0246: The type or namespace name 'ThemeInfoAttribute' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AssemblyInfo.cs(3,11,3,20): error CS0246: The type or namespace name 'ThemeInfo' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AssemblyInfo.cs(4,5,4,31): error CS0103: The name 'ResourceDictionaryLocation' does not exist in the current context 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AssemblyInfo.cs(7,5,7,31): error CS0103: The name 'ResourceDictionaryLocation' does not exist in the current context 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\App.xaml.cs(4,22,4,31): error CS0234: The type or namespace name 'Threading' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\BatteryReader.cs(4,22,4,30): error CS0234: The type or namespace name 'Controls' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\BatteryReader.cs(5,22,5,27): error CS0234: The type or namespace name 'Media' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\BatteryReader.cs(6,22,6,31): error CS0234: The type or namespace name 'Threading' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\KeyboardHook.cs(4,22,4,29): error CS0234: The type or namespace name 'Interop' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(4,22,4,30): error CS0234: The type or namespace name 'Controls' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(5,22,5,27): error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(7,22,7,27): error CS0234: The type or namespace name 'Media' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(16,78,16,101): error CS1069: The type name 'ApplicationSettingsBase' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\KeyboardHook.cs(64,16,64,22): error CS0246: The type or namespace name 'Window' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(12,39,12,45): error CS0246: The type or namespace name 'Window' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\KeyboardHook.cs(85,33,85,36): error CS0246: The type or namespace name 'MSG' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\KeyboardHook.cs(60,9,60,28): error CS0246: The type or namespace name 'WindowInteropHelper' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(26,39,26,65): error CS1069: The type name 'UserScopedSettingAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(26,39,26,65): error CS1069: The type name 'UserScopedSettingAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(28,39,28,67): error CS1069: The type name 'DefaultSettingValueAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(28,39,28,67): error CS1069: The type name 'DefaultSettingValueAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\KeyboardHook.cs(73,29,73,35): error CS0246: The type or namespace name 'Window' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(38,39,38,65): error CS1069: The type name 'UserScopedSettingAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(38,39,38,65): error CS1069: The type name 'UserScopedSettingAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(40,39,40,67): error CS1069: The type name 'DefaultSettingValueAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(40,39,40,67): error CS1069: The type name 'DefaultSettingValueAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(50,39,50,65): error CS1069: The type name 'UserScopedSettingAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(50,39,50,65): error CS1069: The type name 'UserScopedSettingAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(52,39,52,67): error CS1069: The type name 'DefaultSettingValueAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(52,39,52,67): error CS1069: The type name 'DefaultSettingValueAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(109,51,109,66): error CS0246: The type or namespace name 'RoutedEventArgs' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(62,39,62,65): error CS1069: The type name 'UserScopedSettingAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(62,39,62,65): error CS1069: The type name 'UserScopedSettingAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(64,39,64,67): error CS1069: The type name 'DefaultSettingValueAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(64,39,64,67): error CS1069: The type name 'DefaultSettingValueAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(74,39,74,65): error CS1069: The type name 'UserScopedSettingAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(74,39,74,65): error CS1069: The type name 'UserScopedSettingAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(76,39,76,67): error CS1069: The type name 'DefaultSettingValueAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(76,39,76,67): error CS1069: The type name 'DefaultSettingValueAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(121,67,121,87): error CS0246: The type or namespace name 'MouseButtonEventArgs' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(86,39,86,65): error CS1069: The type name 'UserScopedSettingAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(86,39,86,65): error CS1069: The type name 'UserScopedSettingAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(88,39,88,67): error CS1069: The type name 'DefaultSettingValueAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(88,39,88,67): error CS1069: The type name 'DefaultSettingValueAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\BatteryReader.cs(25,32,25,40): error CS0234: The type or namespace name 'Controls' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\App.xaml.cs(11,32,11,43): error CS0246: The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(98,39,98,65): error CS1069: The type name 'UserScopedSettingAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(98,39,98,65): error CS1069: The type name 'UserScopedSettingAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(100,39,100,67): error CS1069: The type name 'DefaultSettingValueAttributeAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\AppSettings.Designer.cs(100,39,100,67): error CS1069: The type name 'DefaultSettingValueAttribute' could not be found in the namespace 'System.Configuration'. This type has been forwarded to assembly 'System.Configuration.ConfigurationManager, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly. 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(157,67,157,87): error CS0246: The type or namespace name 'MouseButtonEventArgs' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\BatteryReader.cs(26,17,26,22): error CS0246: The type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(22,17,22,27): error CS0246: The type or namespace name 'NotifyIcon' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(23,38,23,46): error CS0234: The type or namespace name 'Controls' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\classes\BatteryReader.cs(27,17,27,27): error CS0246: The type or namespace name 'Dispatcher' could not be found (are you missing a using directive or an assembly reference?) 1>G:\Corsair-Headset-Battery-Overlay-0.0.4\MainWindow.xaml.cs(24,23,24,28): error CS0246: The type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)

mx0c commented 3 years ago

Looks like you need to manually add some references. Before helping you with this issue I'm curious why you want to build the project. If you just want to use it you can use the latest build I uploaded here: https://github.com/mx0c/Corsair-Headset-Battery-Overlay/releases/tag/0.0.4

unknwon00 commented 3 years ago

i`m looking at adding the MIC status to the application, that was i can always tell when the mic is on or not.

mx0c commented 3 years ago

try adding the references manual f.e. WindowsBase.dll like described here: https://social.msdn.microsoft.com/Forums/en-US/d332ef66-dcaa-46e6-a4fe-4e86b7066aca/systemwindowsthreading-not-found?forum=wpf

unknwon00 commented 3 years ago

thanks i got it working by converting the code for net core 5. Now to look at adding the mic status :)

mx0c commented 3 years ago

data[2] > VOID_BATTERY_MICUP in BatteryReader.cs indicates if the mic is up or down. If you come up with a good solution to display the mic status feel free to make a pull request :)