Skip to content

Commit

Permalink
Project HidUtilityNuget added to solution. This NuGet is intended to …
Browse files Browse the repository at this point in the history
…offer the same functionality as the hid.cs file currently shared among the different projects. The NuGet compiles without problems but has not yet been tested.
  • Loading branch information
soldernerd committed Sep 26, 2017
1 parent 824a903 commit 9458e1e
Show file tree
Hide file tree
Showing 12 changed files with 1,177 additions and 63 deletions.
36 changes: 19 additions & 17 deletions Console/HidDemoConsole.csproj
Expand Up @@ -14,29 +14,31 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
Expand Down
2 changes: 1 addition & 1 deletion Console/Program.cs
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using hid;
using HidUtilityNuget;

namespace HidDemoConsole
{
Expand Down
40 changes: 13 additions & 27 deletions HidUtilityDemo.sln
@@ -1,48 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HidDemoWindowsForms", "WindowsForms\HidDemoWindowsForms.csproj", "{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HidDemoWpf", "WPF\HidDemoWpf.csproj", "{4D03A54E-0AC7-4B7B-8BC2-33254C454980}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HidDemoConsole", "Console\HidDemoConsole.csproj", "{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HidUtilityNuget", "HidUtilityNuget\HidUtilityNuget.csproj", "{65306590-5C1D-4FCE-BC43-E58B6DD32B8E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Debug|x86.ActiveCfg = Debug|x86
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Debug|x86.Build.0 = Debug|x86
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Release|Any CPU.Build.0 = Release|Any CPU
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Release|x86.ActiveCfg = Release|x86
{16F6C5BD-2B6A-46A1-96E6-7BEB4E0AB5E7}.Release|x86.Build.0 = Release|x86
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Debug|x86.ActiveCfg = Debug|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Debug|x86.Build.0 = Debug|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Release|Any CPU.Build.0 = Release|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Release|x86.ActiveCfg = Release|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Release|x86.Build.0 = Release|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Debug|x86.ActiveCfg = Debug|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Debug|x86.Build.0 = Debug|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Release|Any CPU.Build.0 = Release|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Release|x86.ActiveCfg = Release|Any CPU
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Release|x86.Build.0 = Release|Any CPU
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Release|x86.ActiveCfg = Release|x86
{4D03A54E-0AC7-4B7B-8BC2-33254C454980}.Release|x86.Build.0 = Release|x86
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Release|x86.ActiveCfg = Release|x86
{42E80EF3-1ACF-413E-9AC0-1D1DAED560FA}.Release|x86.Build.0 = Release|x86
{65306590-5C1D-4FCE-BC43-E58B6DD32B8E}.Release|x86.ActiveCfg = Release|x86
{65306590-5C1D-4FCE-BC43-E58B6DD32B8E}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B38E5B7C-10A9-45B8-AE8E-ACFB11590AB9}
EndGlobalSection
EndGlobal
64 changes: 64 additions & 0 deletions HidUtilityDll/HidUtilityDll.csproj
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2A94BC3C-369A-41B2-855E-3FCFCA016C88}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HidUtilityDll</RootNamespace>
<AssemblyName>HidUtilityDll</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\hid.cs">
<Link>hid.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
36 changes: 36 additions & 0 deletions HidUtilityDll/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("HidUtilityDll")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Bank Vontobel AG")]
[assembly: AssemblyProduct("HidUtilityDll")]
[assembly: AssemblyCopyright("Copyright © Bank Vontobel AG 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2a94bc3c-369a-41b2-855e-3fcfca016c88")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
38 changes: 38 additions & 0 deletions HidUtilityNuget/HidUtilityNuget.csproj
@@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Lukas Fässler</Authors>
<Company>soldernerd.com</Company>
<Product>HidUtility</Product>
<Description>A NuGet that allows a .NET application to communicate with a USB HID device in a simple and straight forward way without having to worry about all the COM objects and technical details. It's written in C# and mainly targets that language. It provides a main object, HidUtility, that one can use to subscribe to events such as when a package is received over USB or when a USB device is attached or detached.</Description>
<Copyright>GNU GPLv3</Copyright>
<PackageLicenseUrl>https://www.gnu.org/licenses/gpl-3.0.en.html</PackageLicenseUrl>
<PackageProjectUrl>https://soldernerd.com/2017/02/14/c-usb-hid-utility/</PackageProjectUrl>
<RepositoryUrl>https://github.com/soldernerd/HID_Utility</RepositoryUrl>
<ApplicationIcon />
<OutputType>Library</OutputType>
<StartupObject />
<Configurations>Release</Configurations>
<Platforms>AnyCPU;x86</Platforms>
<NeutralLanguage>en</NeutralLanguage>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="System.Management" />
<Reference Include="WindowsBase" />
</ItemGroup>

</Project>

0 comments on commit 9458e1e

Please sign in to comment.