Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target netstandard2.0 and NH 5.1.0 #391

Merged
merged 10 commits into from
Mar 28, 2018
20 changes: 17 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,20 @@ Task("Copy-Files")
parameters.Configuration,
msBuildSettings
);
PublishProjects(
SrcProjects, "netstandard2.0",
parameters.Paths.Directories.ArtifactsBinNetStandard20.FullPath,
parameters.Version.DotNetAsterix,
parameters.Configuration,
msBuildSettings
);
PublishProjects(
SrcProjects, "netcoreapp2",
parameters.Paths.Directories.ArtifactsBinNetCoreApp2.FullPath,
parameters.Version.DotNetAsterix,
parameters.Configuration,
msBuildSettings
);

CopyFileToDirectory("./LICENSE", parameters.Paths.Directories.ArtifactsBinFullFx);
});
Expand All @@ -111,7 +125,7 @@ Task("Zip-Files")
Zip(parameters.Paths.Directories.ArtifactsBinFullFx, parameters.Paths.Files.ZipArtifactPathDesktop,
GetFiles($"{parameters.Paths.Directories.ArtifactsBinFullFx.FullPath}/**/*"));
});

Task("Create-NuGet-Packages")
.IsDependentOn("Copy-Files")
.Does(() =>
Expand All @@ -120,7 +134,7 @@ Task("Create-NuGet-Packages")
SrcProjects,
parameters.Paths.Directories.NuspecRoot.FullPath,
parameters.Paths.Directories.NugetRoot.FullPath,
parameters.Paths.Directories.ArtifactsBinFullFx.FullPath,
parameters.Paths.Directories.ArtifactsBin.FullPath,
parameters.Version.SemVersion);
});

Expand Down Expand Up @@ -186,7 +200,7 @@ Task("Update-AppVeyor-BuildNumber")
.WithCriteria(() => parameters.IsRunningOnAppVeyor)
.Does(() =>
{
AppVeyor.UpdateBuildVersion(parameters.Version.SemVersion);
// AppVeyor.UpdateBuildVersion(parameters.Version.SemVersion);
})
.ReportError(exception =>
{
Expand Down
15 changes: 13 additions & 2 deletions build/paths.cake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class BuildPaths
var artifactsDir = (DirectoryPath)(context.Directory("./artifacts") + context.Directory("v" + semVersion));
var artifactsBinDir = artifactsDir.Combine("bin");
var artifactsBinFullFx = artifactsBinDir.Combine("net461");
var artifactsBinNetStandard20 = artifactsBinDir.Combine("netstandard2.0");
var artifactsBinNetCoreapp2 = artifactsBinDir.Combine("netcoreapp2");
var testResultsDir = artifactsDir.Combine("test-results");
var nuspecRoot = (DirectoryPath)"nuspec";
var nugetRoot = artifactsDir.Combine("nuget");
Expand All @@ -37,7 +39,9 @@ public class BuildPaths
nuspecRoot,
nugetRoot,
artifactsBinDir,
artifactsBinFullFx);
artifactsBinFullFx,
artifactsBinNetStandard20,
artifactsBinNetCoreapp2);

// Files
var buildFiles = new BuildFiles(
Expand Down Expand Up @@ -72,6 +76,8 @@ public class BuildDirectories
public DirectoryPath NugetRoot { get; private set; }
public DirectoryPath ArtifactsBin { get; private set; }
public DirectoryPath ArtifactsBinFullFx { get; private set; }
public DirectoryPath ArtifactsBinNetStandard20 { get; private set; }
public DirectoryPath ArtifactsBinNetCoreApp2 { get; private set; }
public ICollection<DirectoryPath> ToClean { get; private set; }

public BuildDirectories(
Expand All @@ -80,14 +86,19 @@ public class BuildDirectories
DirectoryPath nuspecRoot,
DirectoryPath nugetRoot,
DirectoryPath artifactsBinDir,
DirectoryPath artifactsBinFullFx)
DirectoryPath artifactsBinFullFx,
DirectoryPath artifactsBinNetStandard20,
DirectoryPath artifactsBinNetCoreapp2
)
{
Artifacts = artifactsDir;
TestResults = testResultsDir;
NuspecRoot = nuspecRoot;
NugetRoot = nugetRoot;
ArtifactsBin = artifactsBinDir;
ArtifactsBinFullFx = artifactsBinFullFx;
ArtifactsBinNetStandard20 = artifactsBinNetStandard20;
ArtifactsBinNetCoreApp2 = artifactsBinNetCoreapp2;
ToClean = new[] {
Artifacts,
TestResults,
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projects": [ "src" ],
"sdk": {
"version": "2.0.0"
"version": "2.1.4"
}
}
10 changes: 7 additions & 3 deletions nuspec/FluentNHibernate.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
<tags>ORM DAL NHibernate DataBase ADO.Net Mappings Conventions</tags>
<copyright>Copyright (c) James Gregory and contributors (Paul Batum, Hudson Akridge, Gleb Chermennov, Jorge Rodríguez Galán).</copyright>
<dependencies>
<dependency id="NHibernate" version="5.0.3" />
<dependency id="NHibernate" version="5.1.0" />
</dependencies>
</metadata>
<files>
<file src="FluentNHibernate.dll" target="lib/net461" />
<file src="FluentNHibernate.xml" target="lib/net461" />
<file src="net461/FluentNHibernate.dll" target="lib/net461" />
<file src="net461/FluentNHibernate.xml" target="lib/net461" />
<file src="netstandard2.0/FluentNHibernate.dll" target="lib/netstandard2.0" />
<file src="netstandard2.0/FluentNHibernate.xml" target="lib/netstandard2.0" />
<file src="netcoreapp2/FluentNHibernate.dll" target="lib/netcoreapp2" />
<file src="netcoreapp2/FluentNHibernate.xml" target="lib/netcoreapp2" />
</files>
</package>
14 changes: 10 additions & 4 deletions nuspec/FluentNHibernate.symbols.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
<tags>ORM DAL NHibernate DataBase ADO.Net Mappings Conventions</tags>
<copyright>Copyright (c) James Gregory and contributors (Paul Batum, Hudson Akridge, Gleb Chermennov, Jorge Rodríguez Galán).</copyright>
<dependencies>
<dependency id="NHibernate" version="5.0.3" />
<dependency id="NHibernate" version="5.1.0" />
</dependencies>
</metadata>
<files>
<file src="FluentNHibernate.dll" target="lib/net461" />
<file src="FluentNHibernate.pdb" target="lib/net461" />
<file src="FluentNHibernate.xml" target="lib/net461" />
<file src="net461/FluentNHibernate.dll" target="lib/net461" />
<file src="net461/FluentNHibernate.xml" target="lib/net461" />
<file src="net461/FluentNHibernate.pdb" target="lib/net461" />
<file src="netstandard2.0/FluentNHibernate.dll" target="lib/netstandard2.0" />
<file src="netstandard2.0/FluentNHibernate.xml" target="lib/netstandard2.0" />
<file src="netstandard2.0/FluentNHibernate.pdb" target="lib/netstandard2.0" />
<file src="netcoreapp2/FluentNHibernate.dll" target="lib/netcoreapp2" />
<file src="netcoreapp2/FluentNHibernate.xml" target="lib/netcoreapp2" />
<file src="netcoreapp2/FluentNHibernate.pdb" target="lib/netcoreapp2" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="EntityFramework" Version="6.2.0" />
<PackageReference Include="NHibernate" Version="5.0.3" />
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="System.Data.SQLite" Version="1.0.106.0" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.106.0" />
<PackageReference Include="System.Data.SQLite.EF6" Version="1.0.106.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/Examples.FirstProject/Examples.FirstProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="EntityFramework" Version="6.2.0" />
<PackageReference Include="NHibernate" Version="5.0.3" />
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="System.Data.SQLite" Version="1.0.106.0" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.106.0" />
<PackageReference Include="System.Data.SQLite.EF6" Version="1.0.106.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>netstandard2.0;net461;netcoreapp2</TargetFrameworks>
<NoWarn>1591</NoWarn>
<PlatformTarget>AnyCpu</PlatformTarget>
</PropertyGroup>
Expand All @@ -15,14 +15,16 @@
<ProjectReference Include="..\FluentNHibernate\FluentNHibernate.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NHibernate" Version="5.0.3" />
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<PackageReference Include="NHibernate" Version="5.1.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System.Configuration" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="NHibernate" Version="5.1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2'">
<PackageReference Include="NHibernate" Version="5.1.0" />
</ItemGroup>

</Project>
39 changes: 27 additions & 12 deletions src/FluentNHibernate.Specs/FluentNHibernate.Specs.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>netstandard2.0;net461;netcoreapp2</TargetFrameworks>
<NoWarn>1591</NoWarn>
<PlatformTarget>AnyCpu</PlatformTarget>
<DebugType Condition="'$(TargetFramework)' != '' AND '$(TargetFramework)' != 'netcoreapp1.0'">Full</DebugType>
<DebugType Condition="'$(TargetFramework)' != '' AND '$(TargetFramework)' != 'netcoreapp2.0'">Full</DebugType>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\Shared.msbuild" />
Expand All @@ -14,23 +14,38 @@
<ProjectReference Include="..\FluentNHibernate\FluentNHibernate.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="4.19.4" />
<PackageReference Include="Machine.Specifications" Version="0.12.0" />
<PackageReference Include="Machine.Specifications.Runner.Console" Version="0.9.3" />
<PackageReference Include="Machine.Specifications.Runner.VisualStudio" Version="2.5.2" />
<PackageReference Include="Mono.Cecil" Version="0.9.6.1" />
<PackageReference Include="NHibernate" Version="5.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="System.Configuration" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xml.Serialization" />
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="FluentAssertions" Version="4.19.4" />
<PackageReference Include="Machine.Specifications" Version="0.12.0" />
<PackageReference Include="Machine.Specifications.Runner.Console" Version="0.9.3" />
<PackageReference Include="Machine.Specifications.Runner.VisualStudio" Version="2.5.2" />
<PackageReference Include="Mono.Cecil" Version="0.9.6.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="FluentAssertions" Version="4.19.4" />
<PackageReference Include="Machine.Specifications" Version="0.12.0" />
<PackageReference Include="Machine.Specifications.Runner.Console" Version="0.9.3" />
<PackageReference Include="Machine.Specifications.Runner.VisualStudio" Version="2.5.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2'">
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="FluentAssertions" Version="4.19.4" />
<PackageReference Include="Machine.Specifications" Version="0.12.0" />
<PackageReference Include="Machine.Specifications.Runner.Console" Version="0.9.3" />
<PackageReference Include="Machine.Specifications.Runner.VisualStudio" Version="2.5.2" />
</ItemGroup>



<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
Expand Down
1 change: 0 additions & 1 deletion src/FluentNHibernate.Testing/AutoMapping/TestFixtures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Data;
using System.Drawing;
using System.IO;
using FluentNHibernate.Automapping.TestFixtures.ComponentTypes;
using FluentNHibernate.Automapping.TestFixtures.CustomCompositeTypes;
using FluentNHibernate.Automapping.TestFixtures.CustomTypes;
Expand Down
26 changes: 24 additions & 2 deletions src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>netstandard2.0;net461;netcoreapp2</TargetFrameworks>
<NoWarn>1591</NoWarn>
<PlatformTarget>AnyCpu</PlatformTarget>
<DebugType Condition="'$(TargetFramework)' != '' AND '$(TargetFramework)' != 'netcoreapp1.0'">Full</DebugType>
Expand All @@ -25,12 +25,13 @@
<ItemGroup>
<PackageReference Include="FakeItEasy" Version="4.3.0" />
<PackageReference Include="Machine.Specifications" Version="0.12.0" />
<PackageReference Include="NHibernate" Version="5.0.3" />
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="System.Data.SQLite" Version="1.0.106" />
<PackageReference Include="System.Data.SQLite.EF6" Version="1.0.106" />
<PackageReference Include="System.Data.SQLite.Linq" Version="1.0.106" />
<PackageReference Include="System.Drawing.Common" Version="4.5.0-preview1-26216-02" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
Expand All @@ -40,8 +41,29 @@
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Serialization" />
<PackageReference Include="FakeItEasy" Version="4.3.0" />
<PackageReference Include="Machine.Specifications" Version="0.12.0" />
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="System.Data.SQLite" Version="1.0.106" />
<PackageReference Include="System.Data.SQLite.EF6" Version="1.0.106" />
<PackageReference Include="System.Data.SQLite.Linq" Version="1.0.106" />

</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="FakeItEasy" Version="4.3.0" />
<PackageReference Include="Machine.Specifications" Version="0.12.0" />
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="System.Data.SQLite" Version="1.0.106" />
<PackageReference Include="System.Data.SQLite.EF6" Version="1.0.106" />
<PackageReference Include="System.Data.SQLite.Linq" Version="1.0.106" />
</ItemGroup>


<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
Expand Down
28 changes: 19 additions & 9 deletions src/FluentNHibernate/FluentNHibernate.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFrameworks>netstandard2.0;net461;netcoreapp2</TargetFrameworks>
<NoWarn>1591</NoWarn>
<PlatformTarget>AnyCpu</PlatformTarget>
<OutputType>Library</OutputType>
Expand All @@ -13,22 +13,31 @@
<Description>FluentNHibernate</Description>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\Shared.msbuild" />

<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NHibernate" Version="5.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">

<Import Project="$(MSBuildThisFileDirectory)..\Shared.msbuild" />

<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<PackageReference Include="NHibernate" Version="5.1.0" />
<Reference Include="System.configuration" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.4.3" />
Copy link
Member

@jrgcubano jrgcubano Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need System.Data.SqlClient?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it seems it is needed for the MsSqlConnectionStringBuilder

Copy link
Contributor

@danilobreda danilobreda Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could create our own implementation of the builder like the MySqlConnectionStringBuilder. Because we use the connectionString only, and have no interaction with the sqlconnectionstringbuilder for the user.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of a package that the developer does not have a interaction with it is not a good implementation. (the user only pass the connectionString as string)

Copy link
Member

@jrgcubano jrgcubano Mar 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danilobreda @mgoodfellow Seem right. You can take care of this in another PR when we finish this one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrgcubano yes i can, i will wait for this release.

</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2'">
<PackageReference Include="NHibernate" Version="5.1.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.4.3" />
</ItemGroup>


<ItemGroup>
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
Expand All @@ -37,4 +46,5 @@
<Link>FluentKey.snk</Link>
</None>
</ItemGroup>

</Project>