Skip to content

Commit b1f04ea

Browse files
authored
Merge pull request #102 from peetw/fix-nuget-packages
Update NuGet packaging for .NET Core/Standard projects
2 parents 242cdc0 + a0c8f96 commit b1f04ea

21 files changed

+138
-545
lines changed

BuildPackages.bat

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
if not exist "./NuGet Packages" mkdir "./NuGet Packages"
2-
call ".nuget/NuGet.exe" pack NHibernate.Spatial.MsSql\NHibernate.Spatial.MsSql.csproj -Build -IncludeReferencedProjects -Properties Configuration=Release -OutputDirectory "./NuGet Packages"
3-
call ".nuget/NuGet.exe" pack NHibernate.Spatial.MySQL\NHibernate.Spatial.MySQL.csproj -Build -IncludeReferencedProjects -Properties Configuration=Release -OutputDirectory "./NuGet Packages"
4-
call ".nuget/NuGet.exe" pack NHibernate.Spatial.PostGis\NHibernate.Spatial.PostGis.csproj -Build -IncludeReferencedProjects -Properties Configuration=Release -OutputDirectory "./NuGet Packages"
5-
call ".nuget/NuGet.exe" pack NHibernate.Spatial.Oracle\NHibernate.Spatial.Oracle.csproj -Build -IncludeReferencedProjects -Properties Configuration=Release -OutputDirectory "./NuGet Packages"
1+
@echo off
2+
3+
REM Create output directory
4+
set solution_dir=%~dp0
5+
set output_dir="%solution_dir%\NuGet Packages"
6+
if not exist %output_dir% mkdir %output_dir%
7+
8+
REM Build NuGet packages
9+
set options=--configuration Release --output %output_dir%
10+
dotnet pack %options% NHibernate.Spatial
11+
dotnet pack %options% NHibernate.Spatial.MsSql
12+
dotnet pack %options% NHibernate.Spatial.MySQL
13+
REM dotnet pack %options% NHibernate.Spatial.Oracle
14+
dotnet pack %options% NHibernate.Spatial.PostGis
Lines changed: 11 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,22 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../NHibernate.Spatial.props" />
3+
44
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{543472AB-D41B-4796-A6C9-8E22B18F0B44}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
5+
<TargetFramework>net461</TargetFramework>
106
<RootNamespace>NHibernate.Spatial</RootNamespace>
11-
<AssemblyName>NHibernate.Spatial.MsSql</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<Deterministic>true</Deterministic>
157
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<DebugType>pdbonly</DebugType>
27-
<Optimize>true</Optimize>
28-
<OutputPath>bin\Release\</OutputPath>
29-
<DefineConstants>TRACE</DefineConstants>
30-
<ErrorReport>prompt</ErrorReport>
31-
<WarningLevel>4</WarningLevel>
32-
</PropertyGroup>
33-
<ItemGroup>
34-
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
35-
<HintPath>..\packages\Antlr3.Runtime.3.5.1\lib\net40-client\Antlr3.Runtime.dll</HintPath>
36-
</Reference>
37-
<Reference Include="GeoAPI, Version=1.7.5.0, Culture=neutral, PublicKeyToken=a1a0da7def465678, processorArchitecture=MSIL">
38-
<HintPath>..\packages\GeoAPI.Core.1.7.5\lib\net45\GeoAPI.dll</HintPath>
39-
</Reference>
40-
<Reference Include="GeoAPI.CoordinateSystems, Version=1.7.5.0, Culture=neutral, PublicKeyToken=a1a0da7def465678, processorArchitecture=MSIL">
41-
<HintPath>..\packages\GeoAPI.CoordinateSystems.1.7.5\lib\net45\GeoAPI.CoordinateSystems.dll</HintPath>
42-
</Reference>
43-
<Reference Include="Iesi.Collections, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
44-
<HintPath>..\packages\Iesi.Collections.4.0.4\lib\net461\Iesi.Collections.dll</HintPath>
45-
</Reference>
46-
<Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
47-
<HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath>
48-
</Reference>
49-
<Reference Include="NetTopologySuite, Version=1.15.1.0, Culture=neutral, PublicKeyToken=f580a05016ebada1, processorArchitecture=MSIL">
50-
<HintPath>..\packages\NetTopologySuite.Core.1.15.1\lib\net45\NetTopologySuite.dll</HintPath>
51-
</Reference>
52-
<Reference Include="NetTopologySuite.CoordinateSystems, Version=1.15.1.0, Culture=neutral, PublicKeyToken=f580a05016ebada1, processorArchitecture=MSIL">
53-
<HintPath>..\packages\NetTopologySuite.CoordinateSystems.1.15.1\lib\net45\NetTopologySuite.CoordinateSystems.dll</HintPath>
54-
</Reference>
55-
<Reference Include="NHibernate, Version=5.1.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
56-
<HintPath>..\packages\NHibernate.5.1.3\lib\net461\NHibernate.dll</HintPath>
57-
</Reference>
58-
<Reference Include="Remotion.Linq, Version=2.1.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b, processorArchitecture=MSIL">
59-
<HintPath>..\packages\Remotion.Linq.2.1.2\lib\net45\Remotion.Linq.dll</HintPath>
60-
</Reference>
61-
<Reference Include="Remotion.Linq.EagerFetching, Version=2.1.0.0, Culture=neutral, PublicKeyToken=fee00910d6e5f53b, processorArchitecture=MSIL">
62-
<HintPath>..\packages\Remotion.Linq.EagerFetching.2.1.0\lib\net45\Remotion.Linq.EagerFetching.dll</HintPath>
63-
</Reference>
64-
<Reference Include="System" />
65-
<Reference Include="System.Configuration" />
66-
<Reference Include="System.Core" />
67-
<Reference Include="System.ServiceModel" />
68-
<Reference Include="System.Transactions" />
69-
<Reference Include="System.Xml.Linq" />
70-
<Reference Include="System.Data.DataSetExtensions" />
71-
<Reference Include="Microsoft.CSharp" />
72-
<Reference Include="System.Data" />
73-
<Reference Include="System.Net.Http" />
74-
<Reference Include="System.Xml" />
75-
</ItemGroup>
76-
<ItemGroup>
77-
<Compile Include="..\SharedAssemblyInfo.cs">
78-
<Link>Properties\SharedAssemblyInfo.cs</Link>
79-
</Compile>
80-
<Compile Include="Dialect\IRegisterationAdaptor.cs" />
81-
<Compile Include="Dialect\MsSql2008FunctionRegistration.cs" />
82-
<Compile Include="Dialect\MsSql2008GeographyDialect.cs" />
83-
<Compile Include="Dialect\MsSql2008GeometryDialect.cs" />
84-
<Compile Include="Dialect\MsSql2008SpatialDialect.cs" />
85-
<Compile Include="Dialect\MsSql2012FunctionRegistration.cs" />
86-
<Compile Include="Dialect\MsSql2012GeographyDialect.cs" />
87-
<Compile Include="Dialect\MsSql2012GeometryDialect.cs" />
88-
<Compile Include="Dialect\MsSql2012SpatialDialect.cs" />
89-
<Compile Include="Properties\AssemblyInfo.cs" />
90-
<Compile Include="Type\MsSql2008GeographyReader.cs" />
91-
<Compile Include="Type\MsSql2008GeographyType.cs" />
92-
<Compile Include="Type\MsSql2008GeographyWriter.cs" />
93-
<Compile Include="Type\MsSql2008GeometryReader.cs" />
94-
<Compile Include="Type\MsSql2008GeometryType.cs" />
95-
<Compile Include="Type\MsSql2008GeometryWriter.cs" />
96-
<Compile Include="Type\NtsGeographySink.cs" />
97-
<Compile Include="Type\NtsGeometrySink.cs" />
98-
<Compile Include="Type\SqlGeographyType.cs" />
99-
<Compile Include="Type\SqlGeometryType.cs" />
100-
</ItemGroup>
8+
1019
<ItemGroup>
10210
<EmbeddedResource Include="Metadata\GeometryColumn.MsSql2008GeographyDialect.hbm.xml" />
10311
<EmbeddedResource Include="Metadata\GeometryColumn.MsSql2008GeometryDialect.hbm.xml" />
10412
</ItemGroup>
13+
10514
<ItemGroup>
106-
<ProjectReference Include="..\NHibernate.Spatial\NHibernate.Spatial.csproj">
107-
<Project>{f6c61d45-b221-4aaf-9539-24192a4ff933}</Project>
108-
<Name>NHibernate.Spatial</Name>
109-
</ProjectReference>
15+
<PackageReference Include="Microsoft.SqlServer.Types" Version="11.0.2" />
11016
</ItemGroup>
17+
11118
<ItemGroup>
112-
<None Include="packages.config" />
19+
<ProjectReference Include="..\NHibernate.Spatial\NHibernate.Spatial.csproj" />
11320
</ItemGroup>
114-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
115-
</Project>
21+
22+
</Project>

NHibernate.Spatial.MsSql/NHibernate.Spatial.MsSql.nuspec

Lines changed: 0 additions & 17 deletions
This file was deleted.

NHibernate.Spatial.MsSql/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 5 deletions
This file was deleted.

NHibernate.Spatial.MsSql/packages.config

Lines changed: 0 additions & 14 deletions
This file was deleted.

NHibernate.Spatial.MySQL/NHibernate.Spatial.MySQL.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../NHibernate.Spatial.props" />
23

34
<PropertyGroup>
45
<TargetFramework>netstandard2.0</TargetFramework>

NHibernate.Spatial.PostGis/NHibernate.Spatial.PostGis.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../NHibernate.Spatial.props" />
23

34
<PropertyGroup>
45
<TargetFramework>netstandard2.0</TargetFramework>

NHibernate.Spatial.props

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- Specify version info -->
4+
<VersionMajor Condition="'$(VersionMajor)' == ''">5</VersionMajor>
5+
<VersionMinor Condition="'$(VersionMinor)' == ''">1</VersionMinor>
6+
<VersionPatch Condition="'$(VersionPatch)' == ''">0</VersionPatch>
7+
<!-- NOTE: Set to "preXYZ" for pre-releases and leave blank for full releases -->
8+
<VersionSuffix Condition="'$(VersionSuffix)' == ''">pre001</VersionSuffix>
9+
10+
<!-- NOTE: Generally shouldn't need to edit anything below this line -->
11+
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionPatch)</VersionPrefix>
12+
<AssemblyVersion>$(VersionMajor).$(VersionMinor).0.0</AssemblyVersion>
13+
<FileVersion>$(VersionPrefix).0</FileVersion>
14+
15+
<Product>NHibernate.Spatial</Product>
16+
<Description>NHibernate.Spatial is a library of spatial extensions for NHibernate, and allows you to connect NHibernate to a spatially enabled database and manipulate geometries in HQL or in .NET code using NetTopologySuite, providing you with a fully integrated GIS programming experience.</Description>
17+
<Company>NHibernate.Spatial Community</Company>
18+
<Copyright>Licensed under LGPL.</Copyright>
19+
<Authors>NHibernate.Spatial Community</Authors>
20+
21+
<PackageProjectUrl>https://github.com/nhibernate/NHibernate.Spatial</PackageProjectUrl>
22+
<PackageIconUrl>https://raw.githubusercontent.com/nhibernate/NHibernate.Spatial/master/Logo/NHibernate.Spatial.png</PackageIconUrl>
23+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
24+
<PackageLicenseUrl>https://raw.githubusercontent.com/nhibernate/NHibernate.Spatial/master/LICENSE.txt</PackageLicenseUrl>
25+
<PackageReleaseNotes>https://github.com/nhibernate/NHibernate.Spatial/blob/v$(VersionPrefix)/releasenotes.txt</PackageReleaseNotes>
26+
<PackageTags>NHibernate; NHibernate.Spatial; ORM; Database; DAL; GIS; GeoSpatial</PackageTags>
27+
<RepositoryUrl>https://github.com/nhibernate/NHibernate.Spatial.git</RepositoryUrl>
28+
<RepositoryType>git</RepositoryType>
29+
</PropertyGroup>
30+
</Project>

NHibernate.Spatial.sln

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.NHibernate.Spatial.Po
2121
EndProject
2222
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.NHibernate.Spatial.PostGis20", "Tests.NHibernate.Spatial.PostGis20\Tests.NHibernate.Spatial.PostGis20.csproj", "{DAEF5C4F-234D-402D-96E5-1B2CB6EBF10E}"
2323
EndProject
24-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.NHibernate.Spatial.MsSql2008", "Tests.NHibernate.Spatial.MsSql2008\Tests.NHibernate.Spatial.MsSql2008.csproj", "{00F2E5AA-1032-4E46-97B0-7DD4B49D64C7}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHibernate.Spatial.MsSql", "NHibernate.Spatial.MsSql\NHibernate.Spatial.MsSql.csproj", "{3BA49B38-653B-4B24-8F2D-3416B07AAA5D}"
2525
EndProject
26-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.NHibernate.Spatial.MsSql2012", "Tests.NHibernate.Spatial.MsSql2012\Tests.NHibernate.Spatial.MsSql2012.csproj", "{196F2914-E5AE-4129-BC63-365003B4319E}"
26+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.NHibernate.Spatial.MsSql2008", "Tests.NHibernate.Spatial.MsSql2008\Tests.NHibernate.Spatial.MsSql2008.csproj", "{D32A19AC-F7EE-4CD1-AA01-BE8B171B37A0}"
2727
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NHibernate.Spatial.MsSql", "NHibernate.Spatial.MsSql\NHibernate.Spatial.MsSql.csproj", "{543472AB-D41B-4796-A6C9-8E22B18F0B44}"
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.NHibernate.Spatial.MsSql2012", "Tests.NHibernate.Spatial.MsSql2012\Tests.NHibernate.Spatial.MsSql2012.csproj", "{12E29E47-4760-427E-8EF9-5D2F39B0E980}"
29+
EndProject
30+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8DBF64ED-50C5-42C0-AED7-64FD617FB649}"
31+
ProjectSection(SolutionItems) = preProject
32+
NHibernate.Spatial.props = NHibernate.Spatial.props
33+
EndProjectSection
2934
EndProject
3035
Global
3136
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -69,18 +74,18 @@ Global
6974
{DAEF5C4F-234D-402D-96E5-1B2CB6EBF10E}.Debug|Any CPU.Build.0 = Debug|Any CPU
7075
{DAEF5C4F-234D-402D-96E5-1B2CB6EBF10E}.Release|Any CPU.ActiveCfg = Release|Any CPU
7176
{DAEF5C4F-234D-402D-96E5-1B2CB6EBF10E}.Release|Any CPU.Build.0 = Release|Any CPU
72-
{00F2E5AA-1032-4E46-97B0-7DD4B49D64C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
73-
{00F2E5AA-1032-4E46-97B0-7DD4B49D64C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
74-
{00F2E5AA-1032-4E46-97B0-7DD4B49D64C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
75-
{00F2E5AA-1032-4E46-97B0-7DD4B49D64C7}.Release|Any CPU.Build.0 = Release|Any CPU
76-
{196F2914-E5AE-4129-BC63-365003B4319E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
77-
{196F2914-E5AE-4129-BC63-365003B4319E}.Debug|Any CPU.Build.0 = Debug|Any CPU
78-
{196F2914-E5AE-4129-BC63-365003B4319E}.Release|Any CPU.ActiveCfg = Release|Any CPU
79-
{196F2914-E5AE-4129-BC63-365003B4319E}.Release|Any CPU.Build.0 = Release|Any CPU
80-
{543472AB-D41B-4796-A6C9-8E22B18F0B44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81-
{543472AB-D41B-4796-A6C9-8E22B18F0B44}.Debug|Any CPU.Build.0 = Debug|Any CPU
82-
{543472AB-D41B-4796-A6C9-8E22B18F0B44}.Release|Any CPU.ActiveCfg = Release|Any CPU
83-
{543472AB-D41B-4796-A6C9-8E22B18F0B44}.Release|Any CPU.Build.0 = Release|Any CPU
77+
{3BA49B38-653B-4B24-8F2D-3416B07AAA5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
78+
{3BA49B38-653B-4B24-8F2D-3416B07AAA5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
79+
{3BA49B38-653B-4B24-8F2D-3416B07AAA5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
80+
{3BA49B38-653B-4B24-8F2D-3416B07AAA5D}.Release|Any CPU.Build.0 = Release|Any CPU
81+
{D32A19AC-F7EE-4CD1-AA01-BE8B171B37A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
82+
{D32A19AC-F7EE-4CD1-AA01-BE8B171B37A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
83+
{D32A19AC-F7EE-4CD1-AA01-BE8B171B37A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
84+
{D32A19AC-F7EE-4CD1-AA01-BE8B171B37A0}.Release|Any CPU.Build.0 = Release|Any CPU
85+
{12E29E47-4760-427E-8EF9-5D2F39B0E980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
86+
{12E29E47-4760-427E-8EF9-5D2F39B0E980}.Debug|Any CPU.Build.0 = Debug|Any CPU
87+
{12E29E47-4760-427E-8EF9-5D2F39B0E980}.Release|Any CPU.ActiveCfg = Release|Any CPU
88+
{12E29E47-4760-427E-8EF9-5D2F39B0E980}.Release|Any CPU.Build.0 = Release|Any CPU
8489
EndGlobalSection
8590
GlobalSection(SolutionProperties) = preSolution
8691
HideSolutionNode = FALSE

NHibernate.Spatial/NHibernate.Spatial.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../NHibernate.Spatial.props" />
23

34
<PropertyGroup>
45
<TargetFramework>netstandard2.0</TargetFramework>

0 commit comments

Comments
 (0)