Skip to content

Commit

Permalink
Migrate to .NET Standard 2.0. 🚚 (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez authored Aug 25, 2017
1 parent 07e0232 commit 12957c5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 34 deletions.
3 changes: 2 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## v2.3.20
* Upgrade Newtonsoft dependency to v10.0.2.
* Upgrade Newtonsoft dependency to v10.0.3.
* Migration to **.NET Standard 2.0**.

## v2.3.19
* Issue 113: Allow client-side generation of ReGrid file ids.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Install-Package RethinkDb.Driver
</tr>
<tr>
<td><strong>.NET Standard</strong></td>
<td colspan='3' align='center'>All platforms supporting <strong>.NET Standard 1.3</strong> or higher.</br>Eg: <a href="https://docs.microsoft.com/en-us/dotnet/articles/standard/library#net-platforms-support"><strong>.NET Core 1.0</strong></a>.</td>
<td colspan='3' align='center'>All platforms supporting <strong>.NET Standard 2.0</strong> or higher.</br>Eg: <a href="https://docs.microsoft.com/en-us/dotnet/articles/standard/library#net-platforms-support"><strong>.NET Core 2.0</strong></a>.</td>
</tr>
<tr>
<td><strong>Mono</strong></td>
Expand Down
9 changes: 2 additions & 7 deletions Source/RethinkDb.Driver.Linq/RethinkDb.Driver.Linq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PackageReleaseNotes>
<Version>0.0.0-localbuild</Version>
<Authors>Brian Chavez;jrote1</Authors>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
Expand All @@ -17,7 +17,6 @@
<PackageLicenseUrl>https://raw.githubusercontent.com/bchavez/RethinkDb.Driver/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/bchavez/RethinkDb.Driver</RepositoryUrl>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.3' ">$(PackageTargetFallback);portable-net451+win8;dnxcore50</PackageTargetFallback>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -27,7 +26,7 @@
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);STANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
Expand All @@ -41,8 +40,4 @@
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
</ItemGroup>
</Project>
5 changes: 2 additions & 3 deletions Source/RethinkDb.Driver.ReGrid/RethinkDb.Driver.ReGrid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PackageReleaseNotes>
<Version>0.0.0-localbuild</Version>
<Authors>Brian Chavez</Authors>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
Expand All @@ -17,7 +17,6 @@
<PackageLicenseUrl>https://raw.githubusercontent.com/bchavez/RethinkDb.Driver/master/LICENSE</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/bchavez/RethinkDb.Driver</RepositoryUrl>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.3' ">$(PackageTargetFallback);portable-net451+win8;dnxcore50</PackageTargetFallback>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -27,7 +26,7 @@
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);STANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions Source/RethinkDb.Driver/Net/Clustering/ConnectionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,7 @@ private void MaybeAddNewHost(Server server)
var test = new TcpClient();
try
{
#if STANDARD
test.ConnectAsync(ip, port).RunSynchronously();
#else
test.Connect(ip, port);
#endif
}
catch
{
Expand Down
4 changes: 0 additions & 4 deletions Source/RethinkDb.Driver/Net/SecureRandom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ namespace RethinkDb.Driver.Net
{
internal class SecureRandom : IDisposable
{
#if STANDARD
private RandomNumberGenerator random = RandomNumberGenerator.Create();
#else
private RNGCryptoServiceProvider random = new RNGCryptoServiceProvider();
#endif

public void GetBytes(byte[] data)
{
Expand Down
19 changes: 5 additions & 14 deletions Source/RethinkDb.Driver/RethinkDb.Driver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PackageReleaseNotes>
<Version>0.0.0-localbuild</Version>
<Authors>Brian Chavez</Authors>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
Expand All @@ -18,7 +18,6 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/bchavez/RethinkDb.Driver</RepositoryUrl>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.3' ">$(PackageTargetFallback);portable-net451+win8;dnxcore50</PackageTargetFallback>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
Expand All @@ -28,26 +27,18 @@
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);STANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<PackageReference Include="Common.Logging" Version="3.3.0" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<PackageReference Include="System.Dynamic.Runtime" Version="4.3.0" />
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.1" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Primitives" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="System.Net.Security" Version="4.3.0" />
<PackageReference Include="System.Net.Primitives" Version="4.3.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
</ItemGroup>
</Project>

0 comments on commit 12957c5

Please sign in to comment.