Skip to content

Commit

Permalink
#23 Update project targeted frameworks, tools and libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
savornicesei committed Feb 23, 2018
1 parent d24d8df commit f0b68b6
Show file tree
Hide file tree
Showing 20 changed files with 446 additions and 74 deletions.
31 changes: 30 additions & 1 deletion NDbUnit.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NDbUnit.Core", "src\NDbUnit.Core\NDbUnit.Core.csproj", "{1DF4AF66-B642-45B1-8899-224477780E4A}"
EndProject
Expand All @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1. Build", "1. Build", "{11
.appveyor.yml = .appveyor.yml
.develop.appveyor.yml = .develop.appveyor.yml
.travis.yml = .travis.yml
src\ndbunit.targets.xml = src\ndbunit.targets.xml
NuGet.config = NuGet.config
EndProjectSection
EndProject
Expand All @@ -33,48 +34,75 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NDbUnit.SqlLite", "src\NDbU
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NDbUnit.SqlServerCe", "src\NDbUnit.SqlServerCe\NDbUnit.SqlServerCe.csproj", "{A32063D7-43F8-4490-8806-7CB6D6C3218C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NDbUnit.UnitTests", "test\NDbUnit.UnitTests\NDbUnit.UnitTests.csproj", "{8EDF4429-251A-416D-BB68-93F227191BCF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_std20|Any CPU = Debug_std20|Any CPU
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1DF4AF66-B642-45B1-8899-224477780E4A}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{1DF4AF66-B642-45B1-8899-224477780E4A}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{1DF4AF66-B642-45B1-8899-224477780E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1DF4AF66-B642-45B1-8899-224477780E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1DF4AF66-B642-45B1-8899-224477780E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1DF4AF66-B642-45B1-8899-224477780E4A}.Release|Any CPU.Build.0 = Release|Any CPU
{A2D6588F-D857-403B-993B-D92F6BC64B12}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{A2D6588F-D857-403B-993B-D92F6BC64B12}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{A2D6588F-D857-403B-993B-D92F6BC64B12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2D6588F-D857-403B-993B-D92F6BC64B12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2D6588F-D857-403B-993B-D92F6BC64B12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2D6588F-D857-403B-993B-D92F6BC64B12}.Release|Any CPU.Build.0 = Release|Any CPU
{D0F9180C-536D-4B8D-BCDE-D9709C8306E3}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{D0F9180C-536D-4B8D-BCDE-D9709C8306E3}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{D0F9180C-536D-4B8D-BCDE-D9709C8306E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0F9180C-536D-4B8D-BCDE-D9709C8306E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0F9180C-536D-4B8D-BCDE-D9709C8306E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0F9180C-536D-4B8D-BCDE-D9709C8306E3}.Release|Any CPU.Build.0 = Release|Any CPU
{C6C0A666-FAA2-49D8-8D38-DC6F2F2E9100}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{C6C0A666-FAA2-49D8-8D38-DC6F2F2E9100}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{C6C0A666-FAA2-49D8-8D38-DC6F2F2E9100}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6C0A666-FAA2-49D8-8D38-DC6F2F2E9100}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6C0A666-FAA2-49D8-8D38-DC6F2F2E9100}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6C0A666-FAA2-49D8-8D38-DC6F2F2E9100}.Release|Any CPU.Build.0 = Release|Any CPU
{DCFF6767-8503-43F2-BFAC-67C1931CB2F0}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{DCFF6767-8503-43F2-BFAC-67C1931CB2F0}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{DCFF6767-8503-43F2-BFAC-67C1931CB2F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCFF6767-8503-43F2-BFAC-67C1931CB2F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCFF6767-8503-43F2-BFAC-67C1931CB2F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DCFF6767-8503-43F2-BFAC-67C1931CB2F0}.Release|Any CPU.Build.0 = Release|Any CPU
{4007F0AF-4B0E-4E8A-A0C5-554119F76D07}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{4007F0AF-4B0E-4E8A-A0C5-554119F76D07}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{4007F0AF-4B0E-4E8A-A0C5-554119F76D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4007F0AF-4B0E-4E8A-A0C5-554119F76D07}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4007F0AF-4B0E-4E8A-A0C5-554119F76D07}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4007F0AF-4B0E-4E8A-A0C5-554119F76D07}.Release|Any CPU.Build.0 = Release|Any CPU
{C37F6AA2-344C-4844-9070-7C451F2B37E1}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{C37F6AA2-344C-4844-9070-7C451F2B37E1}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{C37F6AA2-344C-4844-9070-7C451F2B37E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C37F6AA2-344C-4844-9070-7C451F2B37E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C37F6AA2-344C-4844-9070-7C451F2B37E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C37F6AA2-344C-4844-9070-7C451F2B37E1}.Release|Any CPU.Build.0 = Release|Any CPU
{30CEF411-FB87-4D4F-AF5E-8EB8A0BFDF72}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{30CEF411-FB87-4D4F-AF5E-8EB8A0BFDF72}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{30CEF411-FB87-4D4F-AF5E-8EB8A0BFDF72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30CEF411-FB87-4D4F-AF5E-8EB8A0BFDF72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30CEF411-FB87-4D4F-AF5E-8EB8A0BFDF72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{30CEF411-FB87-4D4F-AF5E-8EB8A0BFDF72}.Release|Any CPU.Build.0 = Release|Any CPU
{A32063D7-43F8-4490-8806-7CB6D6C3218C}.Debug_std20|Any CPU.ActiveCfg = Debug_std20|Any CPU
{A32063D7-43F8-4490-8806-7CB6D6C3218C}.Debug_std20|Any CPU.Build.0 = Debug_std20|Any CPU
{A32063D7-43F8-4490-8806-7CB6D6C3218C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A32063D7-43F8-4490-8806-7CB6D6C3218C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A32063D7-43F8-4490-8806-7CB6D6C3218C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A32063D7-43F8-4490-8806-7CB6D6C3218C}.Release|Any CPU.Build.0 = Release|Any CPU
{8EDF4429-251A-416D-BB68-93F227191BCF}.Debug_std20|Any CPU.ActiveCfg = Debug|Any CPU
{8EDF4429-251A-416D-BB68-93F227191BCF}.Debug_std20|Any CPU.Build.0 = Debug|Any CPU
{8EDF4429-251A-416D-BB68-93F227191BCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8EDF4429-251A-416D-BB68-93F227191BCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8EDF4429-251A-416D-BB68-93F227191BCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8EDF4429-251A-416D-BB68-93F227191BCF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -89,6 +117,7 @@ Global
{C37F6AA2-344C-4844-9070-7C451F2B37E1} = {7DD0FF84-8EAD-47F0-A208-021413504642}
{30CEF411-FB87-4D4F-AF5E-8EB8A0BFDF72} = {7DD0FF84-8EAD-47F0-A208-021413504642}
{A32063D7-43F8-4490-8806-7CB6D6C3218C} = {7DD0FF84-8EAD-47F0-A208-021413504642}
{8EDF4429-251A-416D-BB68-93F227191BCF} = {A727489D-A601-43AC-9B2F-A91D468EB299}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3C449C37-E479-47A0-A2E3-0564AB4894EC}
Expand Down
2 changes: 1 addition & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- see https://docs.microsoft.com/en-us/nuget/schema/nuget-config-file -->
<config>
Expand Down
9 changes: 9 additions & 0 deletions src/NDbUnit.Core/DataSetComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Globalization;
using System.Linq;
using System.Text;
using NDbUnit.Core.Extensions;

namespace NDbUnit.Core
{
Expand Down Expand Up @@ -72,7 +73,11 @@ public NDbUnitDataSetComparer(RootComparer rootComparer)
/// <returns></returns>
public override bool IsTypeMatch(Type type1, Type type2)
{
#if NETSTANDARD
return type1.IsDataset() && type2.IsDataset();
#else
return TypeHelper.IsDataset(type1) && TypeHelper.IsDataset(type2);
#endif
}

/// <summary>
Expand Down Expand Up @@ -161,7 +166,11 @@ public NDbUnitDataTableComparer(RootComparer rootComparer)
/// <returns></returns>
public override bool IsTypeMatch(Type type1, Type type2)
{
#if NETSTANDARD
return type1.IsDataTable() && type2.IsDataTable();
#else
return TypeHelper.IsDataTable(type1) && TypeHelper.IsDataTable(type2);
#endif
}

/// <summary>
Expand Down
42 changes: 42 additions & 0 deletions src/NDbUnit.Core/Extensions/CompareNetObjects.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.Data;

namespace NDbUnit.Core.Extensions
{
/// <summary>
/// Required methods for making CompareNetObjects library compatible with netstandard2.0
/// </summary>
public static class CompareNetObjects
{
#if NETSTANDARD

/// <summary>
/// Returns true if the type is a dataset.
/// </summary>
/// <param name="type">The type.</param>
/// <returns><c>true</c> if the specified type is dataset; otherwise, <c>false</c>.</returns>
/// <remarks>Copied from https://github.com/GregFinzer/Compare-Net-Objects/blob/master/Compare-NET-Objects/TypeHelper.cs since CompareNetObjects is currently only targeting netstandard1.3 that has no System.Data</remarks>
public static bool IsDataset(this Type type)
{
if (type == null)
return false;

return type == typeof(DataSet);
}

/// <summary>
/// Returns true if the type is a data table.
/// </summary>
/// <param name="type">The type.</param>
/// <returns><c>true</c> if [is data table] [the specified type]; otherwise, <c>false</c>.</returns>
/// <remarks>Copied from https://github.com/GregFinzer/Compare-Net-Objects/blob/master/Compare-NET-Objects/TypeHelper.cs since CompareNetObjects is currently only targeting netstandard1.3 that has no System.Data</remarks>
public static bool IsDataTable(this Type type)
{
if (type == null)
return false;

return type == typeof(DataTable);
}
#endif
}
}
31 changes: 25 additions & 6 deletions src/NDbUnit.Core/NDbUnit.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../ndbunit.targets.xml" />
<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<PackageId>NDbUnit2.Core</PackageId>
</PropertyGroup>


<!-- common NuGet package refs -->
<ItemGroup>
<PackageReference Include="CompareNETObjects" Version="4.3.0" />
</ItemGroup>

<!-- .NET Standard 2.0 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.4.0" />
</ItemGroup>

<!-- .NET 4.5.2 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452'">
<DefineConstants>NET452</DefineConstants>
</PropertyGroup>

<!-- .NET framework references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<DefineConstants>NETFULL</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -17,10 +39,7 @@
</ItemGroup>

<ItemGroup>
<Folder Include="Extensions\" />
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CompareNETObjects" Version="4.3.0" />
</ItemGroup>
</Project>
32 changes: 26 additions & 6 deletions src/NDbUnit.MySql/NDbUnit.MySql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,36 @@
<Import Project="../ndbunit.targets.xml" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<PackageId>NDbUnit2.MySql</PackageId>
</PropertyGroup>


<!-- common NuGet package refs -->
<ItemGroup>
<PackageReference Include="MySql.Data" Version="6.10.6" />
</ItemGroup>

<!-- .NET Standard 2.0 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.1" />
<PackageReference Include="System.Security.Permissions" Version="4.4.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.4.0" />
</ItemGroup>

<!-- .NET 4.5.2 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452'">
<DefineConstants>NET452</DefineConstants>
</PropertyGroup>

<!-- .NET framework references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<DefineConstants>NETFULL</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -24,8 +48,4 @@
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="MySql.Data" Version="6.10.5" />
</ItemGroup>
</Project>
22 changes: 20 additions & 2 deletions src/NDbUnit.OleDb/NDbUnit.OleDb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,29 @@
<Import Project="../ndbunit.targets.xml" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>net452</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>


<!-- common NuGet package refs -->
<ItemGroup>
</ItemGroup>

<!-- .NET Standard 2.0 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>

<!-- .NET 4.5.2 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452'">
<DefineConstants>NET452</DefineConstants>
</PropertyGroup>

<!-- .NET framework references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<DefineConstants>NETFULL</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
27 changes: 21 additions & 6 deletions src/NDbUnit.OracleClient/NDbUnit.OracleClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,31 @@
<Import Project="../ndbunit.targets.xml" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFrameworks>net452</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<PackageId>NDbUnit2.Oracle</PackageId>
</PropertyGroup>


<!-- common NuGet package refs -->
<ItemGroup>
<PackageReference Include="Oracle.ManagedDataAccess" Version="12.2.1100" />
</ItemGroup>

<!-- .NET Standard 2.0 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>NETCORE;NETSTANDARD;NETSTANDARD2_0</DefineConstants>
</PropertyGroup>

<!-- .NET 4.5.2 references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' == 'net452'">
<DefineConstants>NET452</DefineConstants>
</PropertyGroup>

<!-- .NET framework references, compilation flags and build options -->
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<DefineConstants>NETFULL</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -24,8 +43,4 @@
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Oracle.ManagedDataAccess" Version="12.2.1100" />
</ItemGroup>
</Project>
Loading

0 comments on commit f0b68b6

Please sign in to comment.