Permalink
Browse files

Update target frameworks for `net452` and `netstandard2.0` (#2131)

  • Loading branch information...
austindrenski committed Aug 27, 2018
1 parent a088929 commit 91d23f90ef00eadc7c07966833959a5b3f877127
View
@@ -27,8 +27,8 @@ before_build:
- appveyor-retry dotnet restore -v Minimal Npgsql.sln
- appveyor-retry nuget restore src\VSIX\packages.config -SolutionDirectory . -Verbosity quiet -NonInteractive
build_script:
- dotnet build "test\Npgsql.Tests" -c Debug -f net451
- dotnet build "test\Npgsql.PluginTests" -c Debug -f net451
- dotnet build "test\Npgsql.Tests" -c Debug -f net452
- dotnet build "test\Npgsql.PluginTests" -c Debug -f net452
- msbuild src\VSIX\VSIX.csproj /p:Configuration=Release /v:Minimal
- msbuild src\MSI\MSI.wixproj /p:Configuration=Release /v:Minimal
after_build:
@@ -40,8 +40,8 @@ after_build:
- dotnet pack src\Npgsql.NetTopologySuite\Npgsql.NetTopologySuite.csproj -c Release
test:
assemblies:
- test\Npgsql.Tests\bin\Debug\net451\Npgsql.Tests.dll
- test\Npgsql.PluginTests\bin\Debug\net451\Npgsql.PluginTests.dll
- test\Npgsql.Tests\bin\Debug\net452\Npgsql.Tests.dll
- test\Npgsql.PluginTests\bin\Debug\net452\Npgsql.PluginTests.dll
artifacts:
- path: 'src\**\*.nupkg'
name: Nuget
View
@@ -0,0 +1,11 @@
---
layout: doc
title: Npgsql 4.1 Release Notes
---
# Npgsql 4.1
## Breaking changes from 4.0
> [!CAUTION]
> .NET 4.5 and .NET 4.5.1 are no longer supported. .NET 4.5.2 and .NET Standard 2.0 are the lowest supported versions.
View
@@ -1,5 +1,6 @@
# [Getting Started](index.md)
# Release Notes
## [4.1](release-notes/4.1.md)
## [4.0](release-notes/4.0.md)
## [3.2](release-notes/3.2.md)
## [3.1](release-notes/3.1.md)
View
@@ -63,7 +63,7 @@
<Import Project="$(WixTargetsPath)" />
<Target Name="CreateWixProperties" BeforeTargets="Compile">
<!-- Get the programs assembly version from the .exe file -->
<GetAssemblyIdentity AssemblyFiles="..\Npgsql\bin\$(Configuration)\net451\Npgsql.dll">
<GetAssemblyIdentity AssemblyFiles="..\Npgsql\bin\$(Configuration)\net452\Npgsql.dll">
<Output TaskParameter="Assemblies" ItemName="AsmInfo" />
</GetAssemblyIdentity>
<CreateProperty Value="%(AsmInfo.Version)">
View
@@ -108,28 +108,28 @@
<Component Id="Npgsql" Guid="f842fa5e-5623-41aa-80aa-6d2e5bf97435">
<File Id="Npgsql"
Name="Npgsql.dll"
Source="..\npgsql\bin\$(var.Configuration)\net451\Npgsql.dll"
Source="..\npgsql\bin\$(var.Configuration)\net452\Npgsql.dll"
KeyPath="yes"
Assembly=".net" />
</Component>
<Component Id="System.Threading.Tasks.Extensions" Guid="d978c06f-7e7f-4865-858e-b9eee77d7470">
<File Id="System.Threading.Tasks.Extensions"
Name="System.Threading.Tasks.Extensions.dll"
Source="..\npgsql\bin\$(var.Configuration)\net451\System.Threading.Tasks.Extensions.dll"
Source="..\npgsql\bin\$(var.Configuration)\net452\System.Threading.Tasks.Extensions.dll"
KeyPath="yes"
Assembly=".net" />
</Component>
<Component Id="System.ValueTuple" Guid="07cfe929-4a0c-4b90-87df-37cceaa970b8">
<File Id="System.ValueTuple"
Name="System.ValueTuple.dll"
Source="..\npgsql\bin\$(var.Configuration)\net451\System.ValueTuple.dll"
Source="..\npgsql\bin\$(var.Configuration)\net452\System.ValueTuple.dll"
KeyPath="yes"
Assembly=".net" />
</Component>
<Component Id="System.Runtime.CompilerServices.Unsafe" Guid="36194b8d-d2af-4dd6-a9a0-fb6942502e53">
<File Id="System.Runtime.CompilerServices.Unsafe"
Name="System.Runtime.CompilerServices.Unsafe.dll"
Source="..\npgsql\bin\$(var.Configuration)\net451\System.Runtime.CompilerServices.Unsafe.dll"
Source="..\npgsql\bin\$(var.Configuration)\net452\System.Runtime.CompilerServices.Unsafe.dll"
KeyPath="yes"
Assembly=".net" />
</Component>
@@ -7,7 +7,7 @@
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<PackageTags>npgsql postgresql postgres postgis geojson spatial ado ado.net database sql</PackageTags>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -7,7 +7,7 @@
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<PackageTags>npgsql postgresql json postgres ado ado.net database sql</PackageTags>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
@@ -6,7 +6,7 @@
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<PackageTags>npgsql postgresql postgres postgis spatial geometry geography ado ado.net database sql</PackageTags>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
@@ -275,7 +275,7 @@ Task INpgsqlTypeHandler<GeometryCollection>.Write(GeometryCollection value, Npgs
Task WriteCore(IGeometry value, NpgsqlWriteBuffer buf, NpgsqlLengthCache lengthCache, NpgsqlParameter parameter, bool async)
{
_writer.Write(value, buf.GetStream());
#if NET45
#if NET452
return Task.Delay(0);
#else
return Task.CompletedTask;
@@ -7,7 +7,7 @@
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<PackageTags>npgsql postgresql postgres postgis nts ado ado.net database sql</PackageTags>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
@@ -7,7 +7,7 @@
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<PackageTags>npgsql postgresql postgres nodatime date time ado ado.net database sql</PackageTags>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
@@ -6,7 +6,7 @@
<Copyright>Copyright 2018 © The Npgsql Development Team</Copyright>
<Company>Npgsql</Company>
<PackageTags>npgsql postgresql postgres postgis spatial geometry geography ado ado.net database sql</PackageTags>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
View
@@ -63,7 +63,7 @@ internal static void Initialize(bool usePerfCounters)
var enabled = false;
var expensiveEnabled = false;
#if NET45 || NET451
#if NET452
try
{
if (usePerfCounters)
@@ -110,7 +110,7 @@ internal static void Initialize(bool usePerfCounters)
/// </summary>
sealed class Counter : IDisposable
{
#if NET45 || NET451
#if NET452
internal const string DiagnosticsCounterCategory = ".NET Data Provider for PostgreSQL (Npgsql)";
[CanBeNull]
@@ -124,7 +124,7 @@ internal Counter(bool enabled, string diagnosticsCounterName)
if (!enabled)
return;
#if NET45 || NET451
#if NET452
DiagnosticsCounter = new PerformanceCounter
{
CategoryName = DiagnosticsCounterCategory,
@@ -143,28 +143,28 @@ internal Counter(bool enabled, string diagnosticsCounterName)
internal void Increment()
{
#if NET45 || NET451
#if NET452
DiagnosticsCounter?.Increment();
#endif
}
internal void Decrement()
{
#if NET45 || NET451
#if NET452
DiagnosticsCounter?.Decrement();
#endif
}
public void Dispose()
{
#if NET45 || NET451
#if NET452
var diagnosticsCounter = DiagnosticsCounter;
DiagnosticsCounter = null;
diagnosticsCounter?.RemoveInstance();
#endif
}
#if NET45 || NET451
#if NET452
void OnProcessExit(object sender, EventArgs e) => Dispose();
void OnDomainUnload(object sender, EventArgs e) => Dispose();
void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
View
@@ -7,7 +7,7 @@
<PackageTags>npgsql postgresql postgres ado ado.net database sql</PackageTags>
<VersionPrefix>4.1.0</VersionPrefix>
<LangVersion>latest</LangVersion>
<TargetFrameworks>net45;net451;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -31,11 +31,7 @@
<PackageReference Include="Microsoft.CodeQuality.Analyzers" Version="2.6.0-beta2" PrivateAssets="All" />
-->
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System.Transactions" Pack="false" />
<Reference Include="System.DirectoryServices" Pack="false" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<Reference Include="System.Transactions" Pack="false" />
<Reference Include="System.DirectoryServices" Pack="false" />
</ItemGroup>
@@ -511,7 +511,7 @@ string GetUsername()
if (!string.IsNullOrEmpty(username))
return Settings.Username;
#if NET45 || NET451
#if NET452
if (PGUtil.IsWindows && Type.GetType("Mono.Runtime") == null)
{
username = WindowsUsernameProvider.GetUsername(Settings.IncludeRealm);
@@ -55,7 +55,7 @@ namespace Npgsql
#pragma warning disable CA1010
public abstract class NpgsqlDataReader : DbDataReader
#pragma warning restore CA1010
#if !NET45 && !NET451
#if !NET452
, IDbColumnSchemaGenerator
#endif
{
@@ -1315,7 +1315,7 @@ public ReadOnlyCollection<NpgsqlDbColumn> GetColumnSchema()
=> new DbColumnSchemaGenerator(_connection, RowDescription, (Behavior & CommandBehavior.KeyInfo) != 0)
.GetColumnSchema();
#if !NET45 && !NET451
#if !NET452
ReadOnlyCollection<DbColumn> IDbColumnSchemaGenerator.GetColumnSchema()
=> new ReadOnlyCollection<DbColumn>(GetColumnSchema().Cast<DbColumn>().ToList());
#endif
View
@@ -135,7 +135,7 @@ static Task<T> CreateCancelledTask<T>()
internal static StringComparer InvariantCaseIgnoringStringComparer => StringComparer.InvariantCultureIgnoreCase;
internal static bool IsWindows =>
#if NET45 || NET451
#if NET452
Environment.OSVersion.Platform == PlatformID.Win32NT;
#else
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
@@ -193,7 +193,7 @@ sealed class CultureSetter : IDisposable
internal CultureSetter(CultureInfo newCulture)
{
_oldCulture = CultureInfo.CurrentCulture;
#if NET45 || NET451
#if NET452
Thread.CurrentThread.CurrentCulture = newCulture;
#else
CultureInfo.CurrentCulture = newCulture;
@@ -202,7 +202,7 @@ internal CultureSetter(CultureInfo newCulture)
public void Dispose()
{
#if NET45 || NET451
#if NET452
Thread.CurrentThread.CurrentCulture = _oldCulture;
#else
CultureInfo.CurrentCulture = _oldCulture;
@@ -21,7 +21,7 @@
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#endregion
#if NET45 || NET451
#if NET452
using System;
@@ -1,4 +1,4 @@
#if NET45 || NET451
#if NET452
using System;
using System.Collections.Generic;
using System.DirectoryServices;
View
@@ -217,13 +217,13 @@
</Reference>
<!-- Note the extra project reference to Npgsql which makes msbuild compile it, but which has Private=true -->
<Reference Include="Npgsql">
<HintPath>..\Npgsql\bin\$(Configuration)\net451\Npgsql.dll</HintPath>
<HintPath>..\Npgsql\bin\$(Configuration)\net452\Npgsql.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe">
<HintPath>..\Npgsql\bin\$(Configuration)\net451\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<HintPath>..\Npgsql\bin\$(Configuration)\net452\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions">
<HintPath>..\Npgsql\bin\$(Configuration)\net451\System.Threading.Tasks.Extensions.dll</HintPath>
<HintPath>..\Npgsql\bin\$(Configuration)\net452\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<EmbedInteropTypes>False</EmbedInteropTypes>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFrameworks>net451;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net452;netcoreapp2.1</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
@@ -1,6 +1,6 @@
using NUnit.Framework;
#if NET451 || NET45
#if NET452
// ReSharper disable once CheckNamespace
[SetUpFixture]
public class PluginsDebugAssertSetupFixture : DebugAssertSetupFixture {}
@@ -1074,7 +1074,7 @@ public void TableNamedRecord()
}
}
#if NET451
#if NET452
[Test, IssueLink("https://github.com/npgsql/npgsql/issues/392")]
public void NonUTF8Encoding()
{
@@ -32,7 +32,7 @@
using NUnit.Framework;
// TransactionScope exists in netstandard20, but distributed transactions do not
#if NET451
#if NET452
namespace Npgsql.Tests
{
@@ -181,7 +181,7 @@ public void PostgresExceptionTransience()
Assert.False(new PostgresException { SqlState = "0" }.IsTransient);
}
#if NET451
#if NET452
[Test]
[Ignore("DbException doesn't support serialization in .NET Core 2.0 (PlatformNotSupportedException)")]
public void Serialization()
@@ -2,7 +2,7 @@
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TargetFrameworks>net451;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net452;netcoreapp2.1</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyOriginatorKeyFile>../../Npgsql.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
@@ -22,7 +22,7 @@
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<Reference Include="System.Transactions" />
</ItemGroup>
@@ -21,7 +21,7 @@
// TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#endregion
#if NET451
#if NET452
using System;
using System.Diagnostics;
using System.Threading;
@@ -3,7 +3,7 @@
using Npgsql.Tests;
using NUnit.Framework;
#if NET451 || NET45
#if NET452
// ReSharper disable once CheckNamespace
[SetUpFixture]
public class DebugAssertSetupFixture
Oops, something went wrong.

0 comments on commit 91d23f9

Please sign in to comment.