Skip to content

Commit c511a94

Browse files
committed
Add .NET Core 2.0 and .NET Standard 2.0 builds
1 parent 825c795 commit c511a94

File tree

78 files changed

+466
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+466
-193
lines changed

Tools/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" />
88
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
99
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" />
10-
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.1" targetFramework="net461" />
10+
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.2" targetFramework="net461" />
1111
<package id="vswhere" version="2.1.4" targetFramework="net461" />
1212
</packages>

src/NHibernate.DomainModel/NHibernate.DomainModel.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../build-common/NHibernate.props" />
33
<PropertyGroup>
44
<Description>The Domain Model used by the Unit Tests.</Description>
5-
<TargetFramework>net461</TargetFramework>
5+
<TargetFrameworks>netstandard2.0;net461;netcoreapp2.0</TargetFrameworks>
66
<IsTestProject>true</IsTestProject>
77
<NoWarn>$(NoWarn);3001;3002;3003;3005</NoWarn>
88
</PropertyGroup>

src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../build-common/NHibernate.props" />
33
<PropertyGroup>
44
<Description>The Visual Basic Unit Tests for NHibernate.</Description>
5-
<TargetFramework>net461</TargetFramework>
5+
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
66
<IsTestProject>true</IsTestProject>
77
<NoWarn>$(NoWarn);3001;3002;3003;3005</NoWarn>
88
<OptionExplicit>On</OptionExplicit>
@@ -11,6 +11,9 @@
1111
<ItemGroup>
1212
<None Remove="**\*.hbm.xml" />
1313
</ItemGroup>
14+
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.0'">
15+
<Compile Remove="**\Issues\NH3302\**" />
16+
</ItemGroup>
1417
<ItemGroup>
1518
<EmbeddedResource Include="**\*.hbm.xml" Exclude="bin\**\*.*" />
1619
</ItemGroup>

src/NHibernate.Test/Ado/BatcherFixture.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public void OneRoundTripUpdate()
8686
Cleanup();
8787
}
8888

89+
#if NET461
8990
[Test, Ignore("Not fixed yet.")]
9091
[Description("SqlClient: The batcher should run all different INSERT queries in only one roundtrip.")]
9192
public void SqlClientOneRoundTripForUpdateAndInsert()
@@ -95,7 +96,7 @@ public void SqlClientOneRoundTripForUpdateAndInsert()
9596

9697
FillDb();
9798

98-
using(var sqlLog = new SqlLogSpy())
99+
using (var sqlLog = new SqlLogSpy())
99100
using (ISession s = Sfi.OpenSession())
100101
using (ITransaction tx = s.BeginTransaction())
101102
{
@@ -140,7 +141,7 @@ public void BatchedoutputShouldBeFormatted()
140141

141142
Cleanup();
142143
}
143-
144+
#endif
144145

145146
[Test]
146147
[Description("The batcher should run all DELETE queries in only one roundtrip.")]

src/NHibernate.Test/App.config

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@
3131
<property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
3232

3333
<property name="connection.driver_class">NHibernate.Driver.Sql2008ClientDriver</property> <!-- Shouldn't be necessary, but is required by some tests -->
34-
<property name="connection.connection_string_name">TestConnectionString</property>
34+
<property name="connection.connection_string">Server=localhost\sqlexpress;Database=nhibernate;Integrated Security=SSPI</property>
3535
<property name="connection.provider">NHibernate.Test.DebugConnectionProvider, NHibernate.Test</property>
3636
<property name="connection.isolation">ReadCommitted</property> <!-- See System.Data.IsolationLevel for valid values -->
37-
<!--property name="connection.connection_string" /-->
3837

3938
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
4039
<property name="cache.use_query_cache">true</property>
@@ -53,7 +52,7 @@
5352
</session-factory>
5453
</hibernate-configuration>
5554

56-
<log4net debug="false">
55+
<log4net debug="false">
5756

5857
<!-- Appenders -->
5958
<appender name="trace" type="log4net.Appender.TraceAppender, log4net">

src/NHibernate.Test/Async/Ado/BatcherFixture.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public async Task OneRoundTripUpdateAsync()
9898
await (CleanupAsync());
9999
}
100100

101+
#if NET461
101102
[Test, Ignore("Not fixed yet.")]
102103
[Description("SqlClient: The batcher should run all different INSERT queries in only one roundtrip.")]
103104
public async Task SqlClientOneRoundTripForUpdateAndInsertAsync()
@@ -107,7 +108,7 @@ public async Task SqlClientOneRoundTripForUpdateAndInsertAsync()
107108

108109
await (FillDbAsync());
109110

110-
using(var sqlLog = new SqlLogSpy())
111+
using (var sqlLog = new SqlLogSpy())
111112
using (ISession s = Sfi.OpenSession())
112113
using (ITransaction tx = s.BeginTransaction())
113114
{
@@ -152,7 +153,7 @@ public async Task BatchedoutputShouldBeFormattedAsync()
152153

153154
await (CleanupAsync());
154155
}
155-
156+
#endif
156157

157158
[Test]
158159
[Description("The batcher should run all DELETE queries in only one roundtrip.")]

src/NHibernate.Test/Async/CfgTest/ConfigurationSerializationTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class ConfigurationSerializationTestsAsync
2828
[Test]
2929
public async Task Basic_CRUD_should_workAsync()
3030
{
31+
Assume.That(typeof(System.Type).IsSerializable);
32+
3133
Assembly assembly = Assembly.Load("NHibernate.DomainModel");
3234
var cfg = new Configuration();
3335
if (TestConfigurationHelper.hibernateConfigFile != null)

src/NHibernate.Test/Async/ConnectionStringTest/NamedConnectionStringFixture.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System;
1212
using System.Collections.Generic;
1313
using System.Data.Common;
14+
using System.Reflection;
1415
using NHibernate.Connection;
1516
using NUnit.Framework;
1617
using Environment=NHibernate.Cfg.Environment;

src/NHibernate.Test/Async/ConnectionTest/AggressiveReleaseTest.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ protected override void Done()
5858
[Test]
5959
public async Task SerializationOnAfterStatementAggressiveReleaseAsync()
6060
{
61+
Assume.That(typeof(System.Type).IsSerializable);
62+
6163
Prepare();
6264
ISession s = GetSessionUnderTest();
6365
Silly silly = new Silly("silly");
@@ -79,6 +81,8 @@ public async Task SerializationOnAfterStatementAggressiveReleaseAsync()
7981
[Test]
8082
public async Task SerializationFailsOnAfterStatementAggressiveReleaseWithOpenResourcesAsync()
8183
{
84+
Assume.That(typeof(System.Type).IsSerializable);
85+
8286
Prepare();
8387
ISession s = GetSessionUnderTest();
8488

@@ -258,4 +262,4 @@ public async Task ConnectionMaintanenceDuringFlushAsync()
258262
Done();
259263
}
260264
}
261-
}
265+
}

src/NHibernate.Test/Async/Criteria/CriteriaQueryTest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@ public async Task CloningCriteria_AddCount_RemoveOrderingAsync()
475475
[Test]
476476
public async Task DetachedCriteriaTestAsync()
477477
{
478+
Assume.That(typeof(System.Type).IsSerializable);
479+
478480
DetachedCriteria dc = DetachedCriteria.For(typeof(Student))
479481
.Add(Property.ForName("Name").Eq("Gavin King"))
480482
.AddOrder(Order.Asc("StudentNumber"))
@@ -3036,4 +3038,4 @@ public async Task CanSetLockModeOnDetachedCriteriaAsync()
30363038
}
30373039
}
30383040
}
3039-
}
3041+
}

0 commit comments

Comments
 (0)