Converted class library into SDK format

Changed to dotnet standard 2.0
Bumped sample and test framework to compatible version
This commit is contained in:
Benjamin Höglinger-Stelzer 2018-11-25 13:54:47 +01:00
parent 4c89660fe5
commit 9eec009587
7 changed files with 38 additions and 120 deletions

2
.gitignore vendored
View File

@ -31,3 +31,5 @@ _ReSharper*/
*.nupkg *.nupkg
/.vs /.vs
/packages /packages
/.tmp
*.DotSettings

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@ -10,8 +10,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PInvokeSerialPort.Sample</RootNamespace> <RootNamespace>PInvokeSerialPort.Sample</RootNamespace>
<AssemblyName>PInvokeSerialPort.Sample</AssemblyName> <AssemblyName>PInvokeSerialPort.Sample</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
@ -23,6 +24,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -32,6 +34,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
@ -52,6 +55,9 @@
<Name>PInvokeSerialPort</Name> <Name>PInvokeSerialPort</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -11,9 +11,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PInvokeSerialPort.Test</RootNamespace> <RootNamespace>PInvokeSerialPort.Test</RootNamespace>
<AssemblyName>PInvokeSerialPort.Test</AssemblyName> <AssemblyName>PInvokeSerialPort.Test</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -23,6 +24,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -31,6 +33,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />

View File

@ -29,16 +29,18 @@ Global
Release|x86 = Release|x86 Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|Any CPU.ActiveCfg = Debug|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|Mixed Platforms.Build.0 = Debug|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|x86.ActiveCfg = Debug|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|x86.Build.0 = Debug|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|x86.ActiveCfg = Debug|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|Any CPU.ActiveCfg = Release|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Debug|x86.Build.0 = Debug|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|Mixed Platforms.ActiveCfg = Release|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|Mixed Platforms.Build.0 = Release|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|Any CPU.Build.0 = Release|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|x86.ActiveCfg = Release|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|x86.Build.0 = Release|x86 {AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|x86.ActiveCfg = Release|Any CPU
{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}.Release|x86.Build.0 = Release|Any CPU
{928609B4-70AB-4D93-A43E-4BE75C279066}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {928609B4-70AB-4D93-A43E-4BE75C279066}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{928609B4-70AB-4D93-A43E-4BE75C279066}.Debug|Any CPU.Build.0 = Debug|Any CPU {928609B4-70AB-4D93-A43E-4BE75C279066}.Debug|Any CPU.Build.0 = Debug|Any CPU
{928609B4-70AB-4D93-A43E-4BE75C279066}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU {928609B4-70AB-4D93-A43E-4BE75C279066}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

View File

@ -1,74 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>netstandard2.0</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<ProductVersion>8.0.30703</ProductVersion> <Authors>Ebrahim Byagowi, Benjamin Höglinger-Stelzer</Authors>
<SchemaVersion>2.0</SchemaVersion> <PackageProjectUrl>https://github.com/nefarius/PInvokeSerialPort</PackageProjectUrl>
<ProjectGuid>{AEC711A5-AA9B-4127-A82C-C4D8FDA9741A}</ProjectGuid> <RepositoryUrl>https://github.com/nefarius/PInvokeSerialPort</RepositoryUrl>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PInvokeSerialPort</RootNamespace>
<AssemblyName>PInvokeSerialPort</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Folder Include="Properties\" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Include="ASCII.cs" />
<Compile Include="SerialPort.cs" />
<Compile Include="CommPortException.cs" />
<Compile Include="ModemStatus.cs" />
<Compile Include="QueueStatus.cs" />
<Compile Include="Win32PInvoke\COMMPROP.cs" />
<Compile Include="Win32PInvoke\COMMTIMEOUTS.cs" />
<Compile Include="Win32PInvoke\COMSTAT.cs" />
<Compile Include="Win32PInvoke\DCB.cs" />
<Compile Include="Handshake.cs" />
<Compile Include="HsOutput.cs" />
<Compile Include="Win32PInvoke\OVERLAPPED.cs" />
<Compile Include="Parity.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StopBits.cs" />
<Compile Include="Win32PInvoke\Win32Com.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> </Project>

View File

@ -1,36 +0,0 @@
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("PInvokeSerialPort")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PInvokeSerialPort")]
[assembly: AssemblyCopyright("Copyright © 2012-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("a9b6ec41-2cde-4cdb-bd80-3dc730bcd820")]
// 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.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]