Skip to content

Commit 45e6d55

Browse files
Merge pull request #35 from IntergatedCircuits/basic-ci
update to .NET 8, add CI
2 parents b0eca5d + 56e2b3e commit 45e6d55

5 files changed

Lines changed: 49 additions & 249 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: .NET
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: 8.0.x
23+
- name: Restore dependencies
24+
run: dotnet restore HidSharp/HidSharp.csproj
25+
- name: Build
26+
run: dotnet build HidSharp/HidSharp.csproj --no-restore

HidSharp.Test/HidSharp.Test.csproj

Lines changed: 11 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>9.0.30729</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{5E83ACC1-19FA-4996-BBAE-BF7DB4604812}</ProjectGuid>
3+
<TargetFramework>net8.0</TargetFramework>
94
<OutputType>Exe</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>HidSharp.Test</RootNamespace>
12-
<AssemblyName>HidSharp.Test</AssemblyName>
13-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<FileUpgradeFlags>
16-
</FileUpgradeFlags>
17-
<UpgradeBackupLocation>
18-
</UpgradeBackupLocation>
19-
<OldToolsVersion>3.5</OldToolsVersion>
20-
<TargetFrameworkProfile>
21-
</TargetFrameworkProfile>
22-
</PropertyGroup>
23-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
24-
<DebugSymbols>true</DebugSymbols>
25-
<DebugType>full</DebugType>
26-
<Optimize>false</Optimize>
27-
<OutputPath>..\bin\</OutputPath>
28-
<DefineConstants>DEBUG;TRACE</DefineConstants>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
31-
<Prefer32Bit>false</Prefer32Bit>
32-
</PropertyGroup>
33-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
34-
<DebugType>pdbonly</DebugType>
35-
<Optimize>true</Optimize>
5+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
366
<OutputPath>..\bin\</OutputPath>
37-
<DefineConstants>TRACE</DefineConstants>
38-
<ErrorReport>prompt</ErrorReport>
39-
<WarningLevel>4</WarningLevel>
40-
<PlatformTarget>x86</PlatformTarget>
41-
<Prefer32Bit>false</Prefer32Bit>
7+
<Company>Illusory Studios LLC</Company>
8+
<Copyright>Copyright © 2010-2013 James F. Bellinger &lt;http://www.zer7.com/software/hidsharp&gt;</Copyright>
9+
<Description>HID test program</Description>
10+
<Product>HidSharp</Product>
11+
<AssemblyTitle>HidSharp.Test</AssemblyTitle>
12+
<FileVersion>1.3.0.0</FileVersion>
13+
<AssemblyVersion>1.3.0.0</AssemblyVersion>
4214
</PropertyGroup>
4315
<ItemGroup>
44-
<Reference Include="System" />
45-
</ItemGroup>
46-
<ItemGroup>
47-
<Compile Include="Program.cs" />
48-
<Compile Include="Properties\AssemblyInfo.cs" />
49-
</ItemGroup>
50-
<ItemGroup>
51-
<ProjectReference Include="..\HidSharp\HidSharp.csproj">
52-
<Project>{0DB86674-2A7B-4BDC-93C1-3F7DC771426C}</Project>
53-
<Name>HidSharp</Name>
54-
</ProjectReference>
55-
</ItemGroup>
56-
<ItemGroup>
57-
<None Include="app.config" />
16+
<ProjectReference Include="..\HidSharp\HidSharp.csproj" />
5817
</ItemGroup>
59-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
60-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
61-
Other similar extension points exist, see Microsoft.Common.targets.
62-
<Target Name="BeforeBuild">
63-
</Target>
64-
<Target Name="AfterBuild">
65-
</Target>
66-
-->
6718
</Project>

HidSharp.Test/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,5 @@
22
using System.Runtime.CompilerServices;
33
using System.Runtime.InteropServices;
44

5-
[assembly: AssemblyCompany("Illusory Studios LLC")]
6-
[assembly: AssemblyCopyright("Copyright © 2010-2013 James F. Bellinger <http://www.zer7.com/software/hidsharp>")]
7-
[assembly: AssemblyDescription("HID test program")]
8-
[assembly: AssemblyProduct("HidSharp")]
9-
[assembly: AssemblyTitle("HidSharp.Test")]
10-
[assembly: AssemblyFileVersion("1.3.0.0")]
11-
[assembly: AssemblyVersion("1.3.0.0")]
12-
135
[assembly: ComVisible(false)]
146
[assembly: Guid("2F0DC374-5974-49E6-A7C6-5FFDEDE5E21D")]

HidSharp/HidSharp.csproj

Lines changed: 12 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,17 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>9.0.30729</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{0DB86674-2A7B-4BDC-93C1-3F7DC771426C}</ProjectGuid>
3+
<TargetFramework>net8.0</TargetFramework>
94
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>HidSharp</RootNamespace>
12-
<AssemblyName>HidSharp</AssemblyName>
13-
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<FileUpgradeFlags>
16-
</FileUpgradeFlags>
17-
<UpgradeBackupLocation>
18-
</UpgradeBackupLocation>
19-
<OldToolsVersion>3.5</OldToolsVersion>
20-
<TargetFrameworkProfile>
21-
</TargetFrameworkProfile>
22-
</PropertyGroup>
23-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
24-
<DebugSymbols>true</DebugSymbols>
25-
<DebugType>full</DebugType>
26-
<Optimize>false</Optimize>
27-
<OutputPath>..\bin\</OutputPath>
28-
<DefineConstants>DEBUG;TRACE</DefineConstants>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
31-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
32-
<RegisterForComInterop>false</RegisterForComInterop>
33-
<DocumentationFile>..\bin\HidSharp.XML</DocumentationFile>
34-
<Prefer32Bit>false</Prefer32Bit>
35-
</PropertyGroup>
36-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
37-
<DebugType>pdbonly</DebugType>
38-
<Optimize>true</Optimize>
5+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
396
<OutputPath>..\bin\</OutputPath>
40-
<DefineConstants>TRACE</DefineConstants>
41-
<ErrorReport>prompt</ErrorReport>
42-
<WarningLevel>4</WarningLevel>
43-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
44-
<RegisterForComInterop>false</RegisterForComInterop>
45-
<DocumentationFile>..\bin\HidSharp.XML</DocumentationFile>
46-
<Prefer32Bit>false</Prefer32Bit>
7+
<Company>Illusory Studios LLC</Company>
8+
<Copyright>Copyright © 2010-2019 James F. Bellinger &lt;http://www.zer7.com/software/hidsharp&gt;</Copyright>
9+
<Description>C# HID wrappers</Description>
10+
<Product>HidSharp</Product>
11+
<AssemblyTitle>HidSharp</AssemblyTitle>
12+
<AssemblyVersion>2.1.0.0</AssemblyVersion>
13+
<FileVersion>2.1.0.0</FileVersion>
14+
<InformationalVersion>2.1.0</InformationalVersion>
15+
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
4716
</PropertyGroup>
48-
<ItemGroup>
49-
<Reference Include="System" />
50-
</ItemGroup>
51-
<ItemGroup>
52-
<Compile Include="AsyncResult.cs" />
53-
<Compile Include="Experimental\BleCccd.cs" />
54-
<Compile Include="Experimental\BleCharacteristic.cs" />
55-
<Compile Include="Experimental\BleDescriptor.cs" />
56-
<Compile Include="Experimental\BleCharacteristicProperties.cs" />
57-
<Compile Include="Experimental\BleDevice.cs" />
58-
<Compile Include="Experimental\BleDiscovery.cs" />
59-
<Compile Include="Experimental\BleEvent.cs" />
60-
<Compile Include="Experimental\BleUuids.cs" />
61-
<Compile Include="Experimental\BleRequestFlags.cs" />
62-
<Compile Include="Experimental\BleService.cs" />
63-
<Compile Include="Experimental\BleUuid.cs" />
64-
<Compile Include="Experimental\BleStream.cs" />
65-
<Compile Include="CommonException.cs" />
66-
<Compile Include="DeviceTypes.cs" />
67-
<Compile Include="Exceptions\DeviceIOException.cs" />
68-
<Compile Include="Exceptions\DeviceUnauthorizedAccessException.cs" />
69-
<Compile Include="Exceptions\IDeviceException.cs" />
70-
<Compile Include="Device.cs" />
71-
<Compile Include="DeviceFilter.cs" />
72-
<Compile Include="DeviceList.cs" />
73-
<Compile Include="DeviceListChangedEventArgs.cs" />
74-
<Compile Include="DeviceOpenUtility.cs" />
75-
<Compile Include="DeviceException.cs" />
76-
<Compile Include="LocalDeviceList.cs" />
77-
<Compile Include="ImplementationDetail.cs" />
78-
<Compile Include="DeviceStream.cs" />
79-
<Compile Include="OpenOption.cs" />
80-
<Compile Include="OpenPriority.cs" />
81-
<Compile Include="OpenConfiguration.cs" />
82-
<Compile Include="Platform\Linux\LinuxSerialDevice.cs" />
83-
<Compile Include="Platform\Linux\LinuxSerialStream.cs" />
84-
<Compile Include="Platform\Linux\NativeMethodsLibudev.cs" />
85-
<Compile Include="Platform\Linux\NativeMethodsLibudev0.cs" />
86-
<Compile Include="Platform\Linux\NativeMethodsLibudev1.cs" />
87-
<Compile Include="Platform\MacOS\MacSerialDevice.cs" />
88-
<Compile Include="Platform\MacOS\MacSerialStream.cs" />
89-
<Compile Include="Platform\SysBleStream.cs" />
90-
<Compile Include="Platform\SysSerialStream.cs" />
91-
<Compile Include="Platform\SysRefCountHelper.cs" />
92-
<Compile Include="Platform\SystemEvents.cs" />
93-
<Compile Include="Platform\SysHidStream.cs" />
94-
<Compile Include="FilteredDeviceList.cs" />
95-
<Compile Include="Platform\Windows\WinBleCharacteristic.cs" />
96-
<Compile Include="Platform\Windows\WinBleDescriptor.cs" />
97-
<Compile Include="Platform\Windows\WinBleDevice.cs" />
98-
<Compile Include="Platform\Windows\WinBleService.cs" />
99-
<Compile Include="Platform\Windows\WinBleStream.cs" />
100-
<Compile Include="Platform\Windows\WinSerialDevice.cs" />
101-
<Compile Include="Platform\Windows\WinSerialStream.cs" />
102-
<Compile Include="Platform\Windows\WinHidDevice.ReportDescriptorReconstructor.cs" />
103-
<Compile Include="Platform\Windows\WinHidDevice.ReportDescriptorBuilder.cs" />
104-
<Compile Include="Reports\DataConvert.cs" />
105-
<Compile Include="Reports\DataValue.cs" />
106-
<Compile Include="Reports\DeviceItem.cs" />
107-
<Compile Include="Reports\Input\DeviceItemInputParser.cs" />
108-
<Compile Include="Reports\Input\HidDeviceInputReceiver.cs" />
109-
<Compile Include="Reports\ReportDescriptorParseState.cs" />
110-
<Compile Include="Reports\Units\UnitKind.cs" />
111-
<Compile Include="Reports\Usage.cs" />
112-
<Compile Include="Reports\ExpectedUsageType.cs" />
113-
<Compile Include="SerialSettings.cs" />
114-
<Compile Include="SerialDevice.cs" />
115-
<Compile Include="SerialParity.cs" />
116-
<Compile Include="SerialStream.cs" />
117-
<Compile Include="Throw.cs" />
118-
<Compile Include="HidDevice.cs" />
119-
<Compile Include="HidDeviceLoader.cs" />
120-
<Compile Include="HidStream.cs" />
121-
<Compile Include="Platform\HidSelector.cs" />
122-
<Compile Include="Platform\HidManager.cs" />
123-
<Compile Include="Platform\Utf8Marshaler.cs" />
124-
<Compile Include="Platform\Windows\NativeMethods.cs" />
125-
<Compile Include="Platform\Windows\WinHidDevice.cs" />
126-
<Compile Include="Platform\Windows\WinHidManager.cs" />
127-
<Compile Include="Platform\Windows\WinHidStream.cs" />
128-
<Compile Include="Platform\Linux\NativeMethods.cs" />
129-
<Compile Include="Platform\Linux\LinuxHidDevice.cs" />
130-
<Compile Include="Platform\Linux\LinuxHidManager.cs" />
131-
<Compile Include="Platform\Linux\LinuxHidStream.cs" />
132-
<Compile Include="Platform\MacOS\NativeMethods.cs" />
133-
<Compile Include="Platform\MacOS\MacHidDevice.cs" />
134-
<Compile Include="Platform\MacOS\MacHidManager.cs" />
135-
<Compile Include="Platform\MacOS\MacHidStream.cs" />
136-
<Compile Include="Platform\Libusb\NativeMethods.cs" />
137-
<Compile Include="Platform\Libusb\LibusbHidManager.cs" />
138-
<Compile Include="Platform\Unsupported\UnsupportedHidManager.cs" />
139-
<Compile Include="Properties\AssemblyInfo.cs" />
140-
<Compile Include="Reports\Encodings\CollectionType.cs" />
141-
<Compile Include="Reports\DataItemFlags.cs" />
142-
<Compile Include="Reports\Encodings\GlobalItemTag.cs" />
143-
<Compile Include="Reports\Encodings\LocalItemTag.cs" />
144-
<Compile Include="Reports\Encodings\EncodedItem.cs" />
145-
<Compile Include="Reports\Encodings\MainItemTag.cs" />
146-
<Compile Include="Reports\Encodings\ItemType.cs" />
147-
<Compile Include="Reports\Indexes.cs" />
148-
<Compile Include="Reports\IndexList.cs" />
149-
<Compile Include="Reports\IndexRange.cs" />
150-
<Compile Include="Reports\Report.cs" />
151-
<Compile Include="Reports\DescriptorCollectionItem.cs" />
152-
<Compile Include="Reports\ReportDescriptor.cs" />
153-
<Compile Include="Reports\DescriptorItem.cs" />
154-
<Compile Include="Reports\DataItem.cs" />
155-
<Compile Include="Reports\ReportType.cs" />
156-
<Compile Include="Reports\Units\CurrentUnit.cs" />
157-
<Compile Include="Reports\Units\LengthUnit.cs" />
158-
<Compile Include="Reports\Units\LuminousIntensityUnit.cs" />
159-
<Compile Include="Reports\Units\MassUnit.cs" />
160-
<Compile Include="Reports\Units\TemperatureUnit.cs" />
161-
<Compile Include="Reports\Units\TimeUnit.cs" />
162-
<Compile Include="Reports\Units\Unit.cs" />
163-
<Compile Include="Reports\Units\UnitSystem.cs" />
164-
<Compile Include="Utility\BcdHelper.cs" />
165-
<Compile Include="Utility\HResult.cs" />
166-
<Compile Include="Utility\HidSharpDiagnostics.cs" />
167-
</ItemGroup>
168-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
169-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
170-
Other similar extension points exist, see Microsoft.Common.targets.
171-
<Target Name="BeforeBuild">
172-
</Target>
173-
<Target Name="AfterBuild">
174-
</Target>
175-
-->
176-
<ItemGroup />
17717
</Project>
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
33

4-
[assembly: AssemblyCompany("Illusory Studios LLC")]
5-
[assembly: AssemblyCopyright("Copyright © 2010-2019 James F. Bellinger <http://www.zer7.com/software/hidsharp>")]
6-
[assembly: AssemblyDescription("C# HID wrappers")]
7-
[assembly: AssemblyProduct("HidSharp")]
8-
[assembly: AssemblyTitle("HidSharp")]
9-
[assembly: AssemblyVersion("2.1.0.0")]
10-
[assembly: AssemblyFileVersion("2.1.0.0")]
11-
[assembly: AssemblyInformationalVersion("2.1.0")]
12-
134
[assembly: ComVisible(false)]
145
[assembly: Guid("1b874372-4c6c-4acb-9f4a-906f6738cff9")]

0 commit comments

Comments
 (0)