diff --git a/README.md b/README.md new file mode 100644 index 0000000..47b1e32 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# LibUsbDotNet +[![Build status](https://ci.appveyor.com/api/projects/status/5fe0th33i60h24bw?svg=true)](https://ci.appveyor.com/project/qmfrederik/libusbdotnet) + +> __NOTE__ This repository contains a fork of LibUsbDotNet; the original repository is located on [SourceForge](https://sourceforge.net/p/libusbdotnet/). +> This repository adds some minor bug fixes and support for .NET Core. + +[LibUsbDotNet](http://sourceforge.net/projects/libusbdotnet) is a .NET C# USB library for WinUsb, libusb-win32, and Linux libusb v1.x developers. +All basic USB device functionality can be performed through common device classes allowing you to write OS and driver independent code. + +* LibUsbDotNet versions 2.2.4 and above support the Libusb-1.0 driver. +* LibUsbDotNet 2.1.0 and above supports the genuine [libusb-win32](http://sourceforge.net/projects/libusb-win32) driver package. However, + access to basic device information via the windows registry is not available. See the [LegacyUsbRegistry](http://libusbdotnet.sourceforge.net/V2/html/9b8a7337-0d0c-c3e6-6f56-d47f1a3e5856.htm) + class for more information. + +## Features +* Full support for WinUSB. All WinUSB interfaces are treated as separate devices; each interface can be used by a different application. +* Extended kernel level support for libusb-win32. +* Supports Unix-like operating systems using Mono .NET and libusb-1.0. +* Common device classes allow for a single code base to support multiple drivers and platforms. +* Includes a Usb InfWizard utility (Windows only) for generating usb installation packages, removing devices, and installing drivers. +* Device discovery using any or all of the folowing criteria: + * VendorID + * ProductID + * Revision Code + * Serial Number + * Device Interface GUID + +Source package includes many small example applications. \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..10f27fa --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,9 @@ +build_script: + - msbuild stage\LibUsbDotNet.sln /p:Configuration=Release /p:Platform="Any CPU" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + - dotnet restore stage\LibUsbDotNet\project.json + - dotnet build stage\LibUsbDotNet\project.json + - dotnet pack stage\LibUsbDotNet\project.json --version-suffix r%APPVEYOR_BUILD_VERSION% + +on_success: + - ps: Push-AppVeyorArtifact stage\LibUsbDotNet\bin\Debug\CoreCompat.LibUsbDotNet.2.2.8-r$($env:APPVEYOR_BUILD_VERSION).nupkg + - ps: Push-AppVeyorArtifact stage\LibUsbDotNet\bin\Debug\CoreCompat.LibUsbDotNet.2.2.8-r$($env:APPVEYOR_BUILD_VERSION).symbols.nupkg \ No newline at end of file diff --git a/stage/Benchmark/Benchmark.csproj b/stage/Benchmark/Benchmark.csproj index 421dfee..4df3088 100644 --- a/stage/Benchmark/Benchmark.csproj +++ b/stage/Benchmark/Benchmark.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -12,11 +12,12 @@ Benchmark - 2.0 + 3.5 - v2.0 + v3.5 UsbIco.ico + true @@ -82,14 +83,20 @@ Designer ResXFileCodeGenerator + Resources.Designer.cs - - Resources.resx - SettingsSingleFileGenerator + Settings.Designer.cs + + True + True + Resources.resx + + True + True Settings.settings @@ -99,8 +106,8 @@ - - {0A78F6FF-5586-4052-8104-E23FF83A7CE1} + + {0a78f6ff-5586-4052-8104-e23ff83a7ce1} LibUsbDotNet diff --git a/stage/Benchmark/Properties/Resources.Designer.cs b/stage/Benchmark/Properties/Resources.Designer.cs index 0e91936..4b91143 100644 --- a/stage/Benchmark/Properties/Resources.Designer.cs +++ b/stage/Benchmark/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -19,7 +19,7 @@ namespace Benchmark.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/stage/Benchmark/Properties/Settings.Designer.cs b/stage/Benchmark/Properties/Settings.Designer.cs index 6d08f61..3a59ff9 100644 --- a/stage/Benchmark/Properties/Settings.Designer.cs +++ b/stage/Benchmark/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ namespace Benchmark.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/stage/BenchmarkCon/BenchmarkCon.csproj b/stage/BenchmarkCon/BenchmarkCon.csproj index 5a6c9a2..65276a8 100644 --- a/stage/BenchmarkCon/BenchmarkCon.csproj +++ b/stage/BenchmarkCon/BenchmarkCon.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,11 +10,15 @@ Properties LibUsbDotNet BenchmarkCon - v2.0 + v3.5 512 - - UsbDos.ico + + + + + 3.5 + true @@ -60,13 +64,9 @@ - - {0A78F6FF-5586-4052-8104-E23FF83A7CE1} - LibUsbDotNet - - - - + + Designer + @@ -76,6 +76,12 @@ + + + {0a78f6ff-5586-4052-8104-e23ff83a7ce1} + LibUsbDotNet + + - - SET USE_ILMERGE=1 -IF NOT DEFINED USE_ILMERGE GOTO DONE -ilmerge /out:"$(TargetDir)Bm$(TargetExt)" "$(TargetPath)" "$(TargetDir)LibUsbDotNet.dll" -:DONE - \ No newline at end of file diff --git a/stage/Examples/Device.Notification/Device.Notification.csproj b/stage/Examples/Device.Notification/Device.Notification.csproj index 3d445c5..0405173 100644 --- a/stage/Examples/Device.Notification/Device.Notification.csproj +++ b/stage/Examples/Device.Notification/Device.Notification.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,10 +10,14 @@ Properties Device.Notification Device.Notification - v2.0 + v3.5 512 - - + + + + + 3.5 + true @@ -57,11 +61,13 @@ - + + Designer + - - {0A78F6FF-5586-4052-8104-E23FF83A7CE1} + + {0a78f6ff-5586-4052-8104-e23ff83a7ce1} LibUsbDotNet diff --git a/stage/Examples/Read.Isochronous/Read.Isochronous.csproj b/stage/Examples/Read.Isochronous/Read.Isochronous.csproj index 22da68e..2e3f669 100644 --- a/stage/Examples/Read.Isochronous/Read.Isochronous.csproj +++ b/stage/Examples/Read.Isochronous/Read.Isochronous.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,14 @@ Properties Read.Isochronous Read.Isochronous - v2.0 + v3.5 512 + + + + + 3.5 + true @@ -56,8 +62,8 @@ - - {0A78F6FF-5586-4052-8104-E23FF83A7CE1} + + {0a78f6ff-5586-4052-8104-e23ff83a7ce1} LibUsbDotNet diff --git a/stage/Examples/Read.Only/Read.Only.csproj b/stage/Examples/Read.Only/Read.Only.csproj index bcf82b1..d94d6bb 100644 --- a/stage/Examples/Read.Only/Read.Only.csproj +++ b/stage/Examples/Read.Only/Read.Only.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,14 @@ Properties Read.Only Read.Only - v2.0 + v3.5 512 + + + + + 3.5 + true @@ -54,8 +60,8 @@ - - {0A78F6FF-5586-4052-8104-E23FF83A7CE1} + + {0a78f6ff-5586-4052-8104-e23ff83a7ce1} LibUsbDotNet diff --git a/stage/Examples/Read.Write.Async/Read.Write.Async.csproj b/stage/Examples/Read.Write.Async/Read.Write.Async.csproj index bb8ddbb..ebe6e66 100644 --- a/stage/Examples/Read.Write.Async/Read.Write.Async.csproj +++ b/stage/Examples/Read.Write.Async/Read.Write.Async.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,14 @@ Properties Read.Write.Async Read.Write.Async - v2.0 + v3.5 512 + + + + + 3.5 + true @@ -54,10 +60,14 @@ - - {0A78F6FF-5586-4052-8104-E23FF83A7CE1} + + {0a78f6ff-5586-4052-8104-e23ff83a7ce1} LibUsbDotNet + + {a893cfaa-fcdf-4055-a8d4-435cde59445f} + Device.Notification +