Skip to content

Commit

Permalink
Support for NetStandard 1.3 (and by extension NetCore).
Browse files Browse the repository at this point in the history
  • Loading branch information
Troy Willmot committed Apr 2, 2017
1 parent 84c6603 commit 6af3c5e
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 8 deletions.
Binary file modified .nuget/nuget.exe
Binary file not shown.
8 changes: 6 additions & 2 deletions Yort.Ntp.Portable.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package >
<metadata>
<id>Yort.Ntp.Portable</id>
<version>1.0.10</version>
<version>1.0.11</version>
<authors>Yortw</authors>
<owners>Troy Willmot</owners>
<licenseUrl>https://github.com/Yortw/Yort.Ntp/blob/master/LICENSE.md</licenseUrl>
<projectUrl>https://github.com/Yortw/Yort.Ntp</projectUrl>
<iconUrl>https://raw.githubusercontent.com/Yortw/Yort.Ntp/master/icon.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A cross platform NTP client for retrieving the current time from internet NTP servers.</description>
<releaseNotes>Fix for NotSupportedException on Android.</releaseNotes>
<releaseNotes>Support for .Net Standard 1.3/NetCore.</releaseNotes>
<copyright>Copyright 2017</copyright>
<tags>ntp windowsphone winrt uwp ios android xamarin date time wp net40 net45</tags>
</metadata>
Expand Down Expand Up @@ -51,6 +51,10 @@
<file src="src\Yort.Ntp.WinRT\bin\Release\Yort*.xml" exclude="**\*.codeanalysislog.xml" target="lib\wpa81" />
<file src="src\Yort.Ntp.WinRT\bin\Release\Yort*.pdb" target="lib\wpa81" />

<file src="src\Yort.Ntp.NetStandard13\bin\Release\Yort*.dll" target="lib\netstandard1.3" />
<file src="src\Yort.Ntp.NetStandard13\bin\Release\Yort*.xml" exclude="**\*.codeanalysislog.xml" target="lib\netstandard1.3" />
<file src="src\Yort.Ntp.NetStandard13\bin\Release\Yort*.pdb" target="lib\netstandard1.3" />

<file src="src\**\*.cs" exclude="**\obj\**\*.*" target="src" />
</files>
</package>
61 changes: 61 additions & 0 deletions src/Yort.Ntp.NetStandard13/Yort.Ntp.NetStandard13.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?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>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Yort.Ntp</RootNamespace>
<AssemblyName>Yort.Ntp.NetStandard13</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;SUPPORTS_COMVISIBLE;SUPPORTS_TASKASYNC;SUPPORTS_TASKDELAY</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;SUPPORTS_COMVISIBLE;SUPPORTS_TASKASYNC;SUPPORTS_TASKDELAY</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\Yort.Ntp.NetStandard13.XML</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\Yort.Ntp.CodeAnalysis.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<None Include="project.json" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<CodeAnalysisDictionary Include="..\CodeAnalysisDictionary.xml">
<Link>Properties\CodeAnalysisDictionary.xml</Link>
</CodeAnalysisDictionary>
</ItemGroup>
<Import Project="..\Yort.Ntp.Shared.StandardSockets\Yort.Ntp.Shared.StandardSockets.projitems" Label="Shared" />
<Import Project="..\Yort.Ntp.SharedImplementation\Yort.Ntp.SharedImplementation.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.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>
10 changes: 10 additions & 0 deletions src/Yort.Ntp.NetStandard13/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.3": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private void Socket_Completed_Receive(object sender, SocketAsyncEventArgs e)
{
var receiveComplete = (bool)(socketArgs.UserToken ?? false);
if (!receiveComplete)
socket?.Close();
socket?.Dispose();
}
);
if (!socket.ReceiveAsync(socketArgs))
Expand Down
6 changes: 3 additions & 3 deletions src/Yort.Ntp.SharedImplementation/AssemblyInfoCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#endif
[assembly: AssemblyCompany("Yort")]
[assembly: AssemblyProduct("Yort.Ntp")]
[assembly: AssemblyCopyright("Copyright © 2016.")]
[assembly: AssemblyCopyright("Copyright © 2017.")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -32,5 +32,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.10.0")]
[assembly: AssemblyFileVersion("1.0.10.0")]
[assembly: AssemblyVersion("1.0.11.0")]
[assembly: AssemblyFileVersion("1.0.11.0")]
6 changes: 4 additions & 2 deletions src/Yort.Ntp.SharedImplementation/NtpNetworkException.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
#if SUPPORTS_SERIALISATION
using System.Runtime.Serialization;
#endif

namespace Yort.Ntp
{
Expand Down Expand Up @@ -51,7 +53,7 @@ public NtpNetworkException(string message, int socketErrorCode, Exception inner)
/// <param name="inner">The original exception that is wrapped by this exception.</param>
public NtpNetworkException(string message, Exception inner) : base(message, inner) { }

#if SUPPORTS_SERIALISATION
#if SUPPORTS_SERIALISATION
/// <summary>
/// Constructor required for serialisation purposes. Not recommended for direct use.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/Yort.Ntp.WinRT.Tests/Yort.Ntp.WinRT.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<PackageCertificateKeyFile>Yort.Ntp.WinRT.Tests_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxBundle>Never</AppxBundle>
<AllowCrossPlatformRetargeting>False</AllowCrossPlatformRetargeting>
<PackageCertificateThumbprint>C15384C253DF994BA4BE61D5C85861138F942EF7</PackageCertificateThumbprint>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
Binary file modified src/Yort.Ntp.WinRT.Tests/Yort.Ntp.WinRT.Tests_TemporaryKey.pfx
Binary file not shown.
20 changes: 20 additions & 0 deletions src/Yort.Ntp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yort.Ntp.Net45", "Yort.Ntp.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yort.Ntp.Android.Tests", "Yort.Ntp.Android.Tests\Yort.Ntp.Android.Tests.csproj", "{1DF87B48-9FE8-46D0-A2F5-D9C61502608A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Yort.Ntp.NetStandard13", "Yort.Ntp.NetStandard13\Yort.Ntp.NetStandard13.csproj", "{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Yort.Ntp.SharedImplementation\Yort.Ntp.SharedImplementation.projitems*{556c64ea-65bd-4746-8e8d-e13a5627cffc}*SharedItemsImports = 4
Expand All @@ -37,6 +39,8 @@ Global
Yort.Ntp.SharedImplementation\Yort.Ntp.SharedImplementation.projitems*{a4b47bfe-5812-4852-88a6-a1b09cdd1542}*SharedItemsImports = 4
Yort.Ntp.Shared.StandardSockets\Yort.Ntp.Shared.StandardSockets.projitems*{b0012c48-36af-4d5d-980f-44bac0313952}*SharedItemsImports = 4
Yort.Ntp.SharedImplementation\Yort.Ntp.SharedImplementation.projitems*{b0012c48-36af-4d5d-980f-44bac0313952}*SharedItemsImports = 4
Yort.Ntp.Shared.StandardSockets\Yort.Ntp.Shared.StandardSockets.projitems*{c57c766c-e8ad-44c8-93f8-bafc7b1a3956}*SharedItemsImports = 4
Yort.Ntp.SharedImplementation\Yort.Ntp.SharedImplementation.projitems*{c57c766c-e8ad-44c8-93f8-bafc7b1a3956}*SharedItemsImports = 4
Yort.Ntp.Shared.StandardSockets\Yort.Ntp.Shared.StandardSockets.projitems*{cb81d93e-e3ef-4919-b6a6-006e38c9169a}*SharedItemsImports = 4
Yort.Ntp.SharedImplementation\Yort.Ntp.SharedImplementation.projitems*{cb81d93e-e3ef-4919-b6a6-006e38c9169a}*SharedItemsImports = 4
Yort.Ntp.Shared.StandardSockets\Yort.Ntp.Shared.StandardSockets.projitems*{d0dc0948-ef31-4702-999d-2b618451bad3}*SharedItemsImports = 4
Expand Down Expand Up @@ -231,6 +235,22 @@ Global
{1DF87B48-9FE8-46D0-A2F5-D9C61502608A}.Release|x86.ActiveCfg = Release|Any CPU
{1DF87B48-9FE8-46D0-A2F5-D9C61502608A}.Release|x86.Build.0 = Release|Any CPU
{1DF87B48-9FE8-46D0-A2F5-D9C61502608A}.Release|x86.Deploy.0 = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|ARM.ActiveCfg = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|ARM.Build.0 = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|x64.ActiveCfg = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|x64.Build.0 = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|x86.ActiveCfg = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Debug|x86.Build.0 = Debug|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|Any CPU.Build.0 = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|ARM.ActiveCfg = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|ARM.Build.0 = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|x64.ActiveCfg = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|x64.Build.0 = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|x86.ActiveCfg = Release|Any CPU
{C57C766C-E8AD-44C8-93F8-BAFC7B1A3956}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 6af3c5e

Please sign in to comment.