Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 65ca315

Browse files
committed
Upgrade all test projects to v4.7.2 / .net5.0
1 parent 89df9eb commit 65ca315

File tree

15 files changed

+67
-20
lines changed

15 files changed

+67
-20
lines changed

src/Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
<DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD2_1</DefineConstants>
4545
</PropertyGroup>
4646

47+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
48+
<DefineConstants>$(DefineConstants);NET50</DefineConstants>
49+
</PropertyGroup>
50+
51+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net5.0' ">
52+
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
53+
</PropertyGroup>
54+
4755
<ItemGroup>
4856
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
4957
</ItemGroup>

src/ServiceStack.OrmLite.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{6CEB3EDE
2222
ServiceStack.OrmLite.SqlServer.Data\ServiceStack.OrmLite.SqlServer.Data.csproj = ServiceStack.OrmLite.SqlServer.Data\ServiceStack.OrmLite.SqlServer.Data.csproj
2323
ServiceStack.OrmLite.SqlServer.Data\ServiceStack.OrmLite.SqlServer.Data.Core.csproj = ServiceStack.OrmLite.SqlServer.Data\ServiceStack.OrmLite.SqlServer.Data.Core.csproj
2424
..\build\build-core-data.proj = ..\build\build-core-data.proj
25+
..\tests\Directory.Build.props = ..\tests\Directory.Build.props
2526
EndProjectSection
2627
EndProject
2728
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServiceStack.OrmLite.Sqlite", "ServiceStack.OrmLite.Sqlite\ServiceStack.OrmLite.Sqlite.csproj", "{CF68A37D-D071-469D-AE04-68594CB95382}"

tests/Directory.Build.props

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,27 @@
2121
<DefineConstants>$(DefineConstants);NETFX;NET46</DefineConstants>
2222
</PropertyGroup>
2323

24-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' Or '$(TargetFramework)' == 'netcoreapp2.2' ">
24+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
25+
<DefineConstants>$(DefineConstants);NETFX;NET461</DefineConstants>
26+
</PropertyGroup>
27+
28+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
29+
<DefineConstants>$(DefineConstants);NETFX;NET472</DefineConstants>
30+
</PropertyGroup>
31+
32+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
33+
<DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD2_0</DefineConstants>
34+
</PropertyGroup>
35+
36+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
37+
<DefineConstants>$(DefineConstants);NETSTANDARD;NETSTANDARD2_1</DefineConstants>
38+
</PropertyGroup>
39+
40+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
41+
<DefineConstants>$(DefineConstants);NET50</DefineConstants>
42+
</PropertyGroup>
43+
44+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'netcoreapp3.1' OR '$(TargetFramework)' == 'net5.0' ">
2545
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
2646
</PropertyGroup>
2747

tests/ServiceStack.OrmLite.FirebirdTests/ServiceStack.OrmLite.FirebirdTests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
3+
<TargetFrameworks>net472;net5.0</TargetFrameworks>
44
<AssemblyName>ServiceStack.OrmLite.FirebirdTests</AssemblyName>
55
<PackageId>ServiceStack.OrmLite.FirebirdTests</PackageId>
6+
<LangVersion>default</LangVersion>
67
</PropertyGroup>
78
<ItemGroup>
89
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />

tests/ServiceStack.OrmLite.MySql.Tests/DateTimeColumnTest.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,17 @@ public void Can_store_and_retrieve_DateTime_Value()
6464
public void Can_change_DateTime_precision()
6565
{
6666
using var db = OpenDbConnection();
67+
#if MYSQLCONNECTOR
68+
if (MySqlConnectorDialect.Provider.GetConverter(typeof(DateTime)) is MySqlDateTimeConverterBase dateConverter)
69+
{
70+
dateConverter.Precision = 3;
71+
}
72+
#else
6773
if (MySqlDialect.Provider.GetConverter(typeof(DateTime)) is MySqlDateTimeConverterBase dateConverter)
6874
{
6975
dateConverter.Precision = 3;
7076
}
77+
#endif
7178

7279
OrmLiteUtils.PrintSql();
7380
db.CreateTable<Analyze>(true);

tests/ServiceStack.OrmLite.MySql.Tests/ServiceStack.OrmLite.MySql.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
4+
<TargetFrameworks>net472;net5.0</TargetFrameworks>
55
<DebugType>portable</DebugType>
66
<AssemblyName>ServiceStack.OrmLite.MySql.Tests</AssemblyName>
77
<OutputType>Library</OutputType>
88
<PackageId>ServiceStack.OrmLite.MySql.Tests</PackageId>
9+
<LangVersion>default</LangVersion>
910
</PropertyGroup>
1011

1112
<ItemGroup>

tests/ServiceStack.OrmLite.MySqlConnector.Tests/ServiceStack.OrmLite.MySqlConnector.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
4+
<TargetFrameworks>net472;net5.0</TargetFrameworks>
55
<DebugType>portable</DebugType>
66
<AssemblyName>ServiceStack.OrmLite.MySqlConnector.Tests</AssemblyName>
77
<OutputType>Library</OutputType>
88
<PackageId>ServiceStack.OrmLite.MySqlMySqlConnector.Tests</PackageId>
9+
<LangVersion>default</LangVersion>
910
</PropertyGroup>
1011

1112
<ItemGroup>

tests/ServiceStack.OrmLite.Oracle.Tests/ServiceStack.OrmLite.Oracle.Tests.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
3+
<TargetFrameworks>net472;net5.0</TargetFrameworks>
44
<AssemblyName>ServiceStack.OrmLite.Oracle.Tests</AssemblyName>
55
<PackageId>ServiceStack.OrmLite.Oracle.Tests</PackageId>
6+
<LangVersion>default</LangVersion>
67
</PropertyGroup>
78

8-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
9+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
910
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
1011
</PropertyGroup>
1112

12-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
13+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net472' ">
1314
<DefineConstants>$(DefineConstants);NET45</DefineConstants>
1415
</PropertyGroup>
1516

@@ -22,7 +23,7 @@
2223
<PackageReference Include="NUnit" Version="3.12.0" />
2324
</ItemGroup>
2425

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
26+
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
2627
<Reference Include="System.Configuration" />
2728
<Reference Include="System.Threading" />
2829
<Reference Include="System.Threading.Tasks" />
@@ -34,7 +35,7 @@
3435
<Reference Include="System.ComponentModel.DataAnnotations" />
3536
</ItemGroup>
3637

37-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
38+
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
3839
<PackageReference Include="System.Runtime" Version="4.3.1" />
3940
<PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" />
4041
<PackageReference Include="System.Reflection" Version="4.3.0" />

tests/ServiceStack.OrmLite.PostgreSQL.Tests/ServiceStack.OrmLite.PostgreSQL.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
3+
<TargetFrameworks>net472;net5.0</TargetFrameworks>
44
<DebugType>portable</DebugType>
55
<AssemblyName>ServiceStack.OrmLite.PostgreSQL.Tests</AssemblyName>
66
<OutputType>Library</OutputType>
77
<PackageId>ServiceStack.OrmLite.PostgreSQL.Tests</PackageId>
8+
<LangVersion>default</LangVersion>
89
</PropertyGroup>
910
<ItemGroup>
1011
<ProjectReference Include="..\ServiceStack.OrmLite.Tests\ServiceStack.OrmLite.Tests.csproj" />

tests/ServiceStack.OrmLite.SqlServer.Tests/ServiceStack.OrmLite.SqlServer.Tests.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
3+
<TargetFrameworks>net472;net5.0</TargetFrameworks>
44
<PackageId>ServiceStack.OrmLite.SqlServerTests</PackageId>
55
<RootNamespace>ServiceStack.OrmLite.SqlServerTests</RootNamespace>
6+
<LangVersion>default</LangVersion>
67
</PropertyGroup>
78
<ItemGroup>
89
<ProjectReference Include="..\..\src\ServiceStack.OrmLite.SqlServer.Converters\ServiceStack.OrmLite.SqlServer.Converters.csproj" />
@@ -12,7 +13,7 @@
1213
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
1314
<PackageReference Include="NUnit" Version="3.12.0" />
1415
</ItemGroup>
15-
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
16+
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
1617
<Reference Include="System" />
1718
<Reference Include="System.Configuration" />
1819
<Reference Include="System.Threading" />

0 commit comments

Comments
 (0)