Target .NET Framework 4.6.1 as well as .NET Standard 2.0

This commit is contained in:
Alexander Luzgarev 2018-05-27 15:00:25 +02:00
parent 626682735b
commit d0a56695fa
2 changed files with 7 additions and 2 deletions

View File

@ -80,6 +80,9 @@ namespace MatFileHandler
private static string GetOperatingSystem() private static string GetOperatingSystem()
{ {
#if NET461
return "Windows";
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{ {
return "Windows"; return "Windows";
@ -93,6 +96,7 @@ namespace MatFileHandler
return "Linux"; return "Linux";
} }
return "Unknown"; return "Unknown";
#endif
} }
} }
} }

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<PackageVersion>1.0.0</PackageVersion> <PackageVersion>1.0.0</PackageVersion>
<PackageId>MatFileHandler</PackageId> <PackageId>MatFileHandler</PackageId>
<Title>A library for reading and writing MATLAB .mat files.</Title> <Title>A library for reading and writing MATLAB .mat files.</Title>
@ -13,7 +13,7 @@
<PackageTags>Matlab</PackageTags> <PackageTags>Matlab</PackageTags>
<RepositoryUrl>https://github.com/mahalex/MatFileHandler</RepositoryUrl> <RepositoryUrl>https://github.com/mahalex/MatFileHandler</RepositoryUrl>
<OutputPath>bin\$(Configuration)\</OutputPath> <OutputPath>bin\$(Configuration)\</OutputPath>
<DocumentationFile>$(OutputPath)\MatFileHandler.xml</DocumentationFile> <DocumentationFile>$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@ -29,5 +29,6 @@
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004"> <PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
<PrivateAssets>All</PrivateAssets> <PrivateAssets>All</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="System.ValueTuple" Version="4.4.0" Condition="'$(TargetFramework)' == 'net461'" />
</ItemGroup> </ItemGroup>
</Project> </Project>