Skip to content

Commit f1720dc

Browse files
committed
.NET Core 1.0 RTM support and upgrade to Json.NET 9
- NET45 and NET46 targets are built with msbuild - NETStandard1.3 target is built with the dotnet cli (preview2) - Bump Json.Net to 9.0.1 - Removed auxiliary projects from Elasticsearch.Dotnet.sln (.NET core solution) - project.json files now only list .NET core frameworks - Include gitlink symbol files in nuget packages - Various build script fixes and refactoring Unrelated change: - Renamed code generation projects: - CodeGeneration.LowLevelClient => ApiGenerator - Nest.Litterateur => DocGenerator
1 parent 4e52024 commit f1720dc

File tree

295 files changed

+5172
-2208
lines changed

Some content is hidden

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

295 files changed

+5172
-2208
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ _ReSharper*/
3434
_NCrunch*/
3535
[Tt]est[Rr]esult*
3636

37-
.fake/*
37+
.fake/*
3838
.fake
3939
packages/*
4040
paket.exe
@@ -69,7 +69,9 @@ YamlCache
6969

7070
launchSettings.json
7171
# https://github.com/elastic/elasticsearch-net/pull/1822#issuecomment-183722698
72+
*.project.lock.json
7273
project.lock.json
7374

7475
.idea/
75-
*.sln.iml
76+
*.sln.iml
77+
/src/.vs/restore.dg

build/Elasticsearch.Net.nuspec

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,49 @@
1-
<?xml version="1.0"?>
2-
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
33
<metadata>
44
<id>Elasticsearch.Net</id>
5-
<version>2.0.0-alpha2</version>
6-
<title>Elasticsearch.Net - official low level elasticsearch client</title>
5+
<version>$version$</version>
76
<authors>Elastic and contributors</authors>
87
<owners>Elastic</owners>
8+
<licenseUrl>https://github.com/elastic/elasticsearch-net/blob/master/license.txt</licenseUrl>
9+
<projectUrl>https://github.com/elastic/elasticsearch-net</projectUrl>
910
<iconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</iconUrl>
10-
<licenseUrl>https://github.com/elasticsearch/elasticsearch-net/blob/master/license.txt</licenseUrl>
11-
<projectUrl>https://github.com/elasticsearch/elasticsearch-net</projectUrl>
12-
<summary>
13-
Exposes all the elasticsearch API endpoints but leaves you in control of building the request and response bodies. Comes with built in cluster failover/connection pooling support.
14-
</summary>
1511
<requireLicenseAcceptance>false</requireLicenseAcceptance>
16-
<description>
17-
Exposes all the elasticsearch API endpoints but leaves you in control of building the request and response bodies. Comes with built in cluster failover/connection pooling support.
18-
</description>
19-
<tags>elasticsearch elastic search lucene nest</tags>
12+
<description>Elasticsearch.Net</description>
13+
<summary>Exposes all the elasticsearch API endpoints but leaves you in control of building the request and response bodies. Comes with built in cluster failover/connection pooling support.</summary>
14+
<releaseNotes>See https://github.com/elastic/elasticsearch-net/releases/tag/$version$</releaseNotes>
15+
<copyright>2014-2016 Elasticsearch BV</copyright>
16+
<tags>elasticsearch,elastic,search,lucene,nest</tags>
17+
<dependencies>
18+
<group targetFramework=".NETFramework4.5" />
19+
<group targetFramework=".NETFramework4.6">
20+
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
21+
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
22+
</group>
23+
<group targetFramework=".NETStandard1.3">
24+
<dependency id="NETStandard.Library" version="[1.6.0, )" />
25+
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
26+
<dependency id="System.Runtime.Serialization.Primitives" version="[4.1.1, )" />
27+
<dependency id="Microsoft.CSharp" version="[4.0.1, )" />
28+
<dependency id="System.Dynamic.Runtime" version="[4.0.11, )" />
29+
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
30+
<dependency id="System.ComponentModel.TypeConverter" version="[4.1.0, )" />
31+
</group>
32+
</dependencies>
2033
</metadata>
2134
<files>
2235
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.dll" target="lib\net45"/>
2336
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.pdb" target="lib\net45"/>
37+
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.pdb.srcsrv" target="lib\net45"/>
2438
<file src="output\Elasticsearch.Net\net45\Elasticsearch.Net.XML" target="lib\net45"/>
39+
40+
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.dll" target="lib\net46"/>
41+
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.pdb" target="lib\net46"/>
42+
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.pdb.srcsrv" target="lib\net46"/>
43+
<file src="output\Elasticsearch.Net\net46\Elasticsearch.Net.XML" target="lib\net46"/>
44+
45+
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.dll" target="lib\netstandard1.3"/>
46+
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.pdb" target="lib\netstandard1.3"/>
47+
<file src="output\Elasticsearch.Net\netstandard1.3\Elasticsearch.Net.pdb.srcsrv" target="lib\netstandard1.3"/>
2548
</files>
2649
</package>

build/NEST.nuspec

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,54 @@
1-
<?xml version="1.0"?>
2-
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
33
<metadata>
44
<id>NEST</id>
5-
<version>2.0.0-alpha2</version>
6-
<title>NEST - Elasticsearch .NET client</title>
5+
<version>$version$</version>
76
<authors>Elastic and contributors</authors>
87
<owners>Elastic</owners>
8+
<licenseUrl>https://github.com/elastic/elasticsearch-net/blob/master/license.txt</licenseUrl>
9+
<projectUrl>https://github.com/elastic/elasticsearch-net</projectUrl>
910
<iconUrl>https://raw.githubusercontent.com/elastic/elasticsearch-net/master/build/nuget-icon.png</iconUrl>
10-
<licenseUrl>https://github.com/elasticsearch/elasticsearch-net/blob/master/license.txt</licenseUrl>
11-
<projectUrl>https://github.com/elasticsearch/elasticsearch-net</projectUrl>
12-
<summary>Strongly typed interface to Elasticsearch. Fluent and classic object initializer mappings of requests and responses. Uses and exposes Elasticsearch.Net</summary>
1311
<requireLicenseAcceptance>false</requireLicenseAcceptance>
14-
<description>Strongly typed interface to Elasticsearch. Fluent and classic object initializer mappings of requests and responses. Uses and exposes Elasticsearch.Net</description>
12+
<description>Nest</description>
13+
<summary>Strongly typed interface to Elasticsearch. Fluent and classic object initializer mappings of requests and responses. Uses and exposes Elasticsearch.Net</summary>
14+
<releaseNotes>See https://github.com/elastic/elasticsearch-net/releases/tag/$version$</releaseNotes>
15+
<copyright>2014-2016 Elasticsearch BV</copyright>
16+
<tags>elasticsearch,elastic,search,lucene,nest</tags>
1517
<dependencies>
16-
<dependency id="Elasticsearch.Net" version="2.0.0-alpha2"/>
17-
<dependency id="Newtonsoft.Json" version="[8,9)" />
18+
<group targetFramework=".NETFramework4.5">
19+
<dependency id="Elasticsearch.Net" version="$version$" />
20+
<dependency id="Newtonsoft.Json" version="[9,10)" />
21+
</group>
22+
<group targetFramework=".NETFramework4.6">
23+
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
24+
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
25+
<dependency id="System.Linq.Queryable" version="[4.0.0, )" />
26+
<dependency id="Elasticsearch.Net" version="$version$" />
27+
<dependency id="Newtonsoft.Json" version="[9,10)" />
28+
</group>
29+
<group targetFramework=".NETStandard1.3">
30+
<dependency id="NETStandard.Library" version="[1.6.0, )" />
31+
<dependency id="System.Collections.Specialized" version="[4.0.1, )" />
32+
<dependency id="System.Reflection.TypeExtensions" version="[4.1.0, )" />
33+
<dependency id="System.Linq.Queryable" version="[4.0.1, )" />
34+
<dependency id="Elasticsearch.Net" version="$version$" />
35+
<dependency id="Newtonsoft.Json" version="[9,10)" />
36+
</group>
1837
</dependencies>
19-
<tags>elasticsearch elastic search lucene nest</tags>
2038
</metadata>
2139
<files>
2240
<file src="output\Nest\net45\Nest.dll" target="lib\net45"/>
2341
<file src="output\Nest\net45\Nest.pdb" target="lib\net45"/>
42+
<file src="output\Nest\net45\Nest.pdb.srcsrv" target="lib\net45"/>
2443
<file src="output\Nest\net45\Nest.XML" target="lib\net45"/>
44+
45+
<file src="output\Nest\net46\Nest.dll" target="lib\net46"/>
46+
<file src="output\Nest\net46\Nest.pdb" target="lib\net46"/>
47+
<file src="output\Nest\net46\Nest.pdb.srcsrv" target="lib\net46"/>
48+
<file src="output\Nest\net46\Nest.XML" target="lib\net46"/>
49+
50+
<file src="output\Nest\netstandard1.3\Nest.dll" target="lib\netstandard1.3"/>
51+
<file src="output\Nest\netstandard1.3\Nest.pdb" target="lib\netstandard1.3"/>
52+
<file src="output\Nest\netstandard1.3\Nest.pdb.srcsrv" target="lib\netstandard1.3"/>
2553
</files>
2654
</package>

build/scripts/Building.fsx

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,45 @@
11
#I @"../../packages/build/FAKE/tools"
22
#r @"FakeLib.dll"
3+
34
#load @"Paths.fsx"
45
#load @"Projects.fsx"
56
open System
7+
68
open Fake
9+
710
open Paths
811
open Projects
912

1013
let gitLink pdbDir projectName =
1114
let exe = Paths.Tool("gitlink/lib/net45/GitLink.exe")
1215
ExecProcess(fun p ->
13-
p.FileName <- exe
14-
p.Arguments <- sprintf @". -u %s -d %s -include %s" Paths.Repository pdbDir projectName
16+
p.FileName <- exe
17+
p.Arguments <- sprintf @". -u %s -d %s -include %s" Paths.Repository pdbDir projectName
1518
) (TimeSpan.FromMinutes 5.0) |> ignore
1619

1720
type Build() =
18-
//Override the prebuild event because it just calls a fake task BuildApp depends on anyways
19-
static let msbuildProperties = [
20-
("Configuration","Release");
21-
("PreBuildEvent","echo");
22-
]
2321

24-
static member QuickCompile() =
25-
let projects = !! Paths.Source("*/project.json")
26-
|> Seq.map DirectoryName
22+
static let allProjects = DotNetProject.All |> Seq.map(fun p -> p.Name)
2723

24+
static let compileCore projects =
2825
projects
29-
|> Seq.iter(fun project ->
30-
let path = (Paths.Quote project)
31-
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["restore"; path; "--quiet"]
32-
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["build"; path; "--configuration Release --quiet"]
26+
|> Seq.iter(fun p ->
27+
let path = (Paths.Quote (Paths.ProjectJson p))
28+
Tooling.DotNet.Exec Tooling.DotNetRuntime.Core Build.BuildFailure p ["restore"; path; "--verbosity Warning"]
29+
Tooling.DotNet.Exec Tooling.DotNetRuntime.Core Build.BuildFailure p ["build"; path; "--configuration Release"]
3330
)
3431

35-
static member BuildFailure errors =
36-
raise (BuildException("The project build failed.", errors |> List.ofSeq))
37-
38-
static member Compile() =
39-
let projects = !! Paths.Source("*/project.json")
40-
|> Seq.map DirectoryName
41-
32+
static let compileDesktop projects =
4233
projects
43-
|> Seq.iter(fun project ->
44-
45-
//eventhough this says desktop it still builds all the tfm's it just hints wich installed dnx version to use
46-
let path = (Paths.Quote project)
47-
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["restore"; path; "--quiet"]
48-
Tooling.Dnu.Exec Tooling.DotNetRuntime.Desktop Build.BuildFailure project ["build"; path; "--configuration Release --quiet"]
34+
|> Seq.iter(fun project ->
35+
Tooling.MsBuild.Exec (Paths.Net45BinFolder project) "Rebuild" Tooling.DotNetFramework.Net45.Identifier [Paths.CsProj(project)]
36+
Tooling.MsBuild.Exec (Paths.Net46BinFolder project) "Rebuild" Tooling.DotNetFramework.Net46.Identifier [Paths.CsProj(project)]
4937
)
5038

39+
static let copyToOutput projects =
5140
projects
52-
|> Seq.iter(fun project ->
53-
let projectName = (project |> directoryInfo).Name
41+
|> Seq.iter(fun p ->
42+
let projectName = (p |> directoryInfo).Name
5443
let outputFolder = Paths.Output(projectName)
5544
let binFolder = Paths.BinFolder(projectName)
5645
if not isMono then
@@ -59,10 +48,23 @@ type Build() =
5948
| "Elasticsearch.Net" ->
6049
gitLink (Paths.Net45BinFolder projectName) projectName
6150
gitLink (Paths.Net46BinFolder projectName) projectName
62-
gitLink (Paths.DotNet51BinFolder projectName) projectName
51+
gitLink (Paths.NetStandard13BinFolder projectName) projectName
6352
| _ -> ()
6453
CopyDir outputFolder binFolder allFiles
6554
)
55+
56+
static member BuildFailure errors =
57+
raise (BuildException("The project build failed.", errors |> List.ofSeq))
6658

59+
static member QuickCompile() =
60+
compileDesktop allProjects
61+
compileCore allProjects
6762

63+
static member Compile() =
64+
compileDesktop allProjects
65+
compileCore allProjects
66+
copyToOutput allProjects
6867

68+
static member Clean() =
69+
CleanDir Paths.BuildOutput
70+
allProjects |> Seq.iter(fun p -> CleanDir(Paths.BinFolder p))

build/scripts/Documentation.fsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#I @"../../packages/build/FAKE/tools"
22
#r @"FakeLib.dll"
3+
34
#load @"Paths.fsx"
5+
46
open System
7+
58
open Fake
9+
610
open Paths
711

812
module Documentation =

build/scripts/InheritDoc.fsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
#r @"FakeLib.dll"
33
#r "System.Xml.Linq.dll"
44

5-
open System.Xml
6-
open System.Xml.XPath
75
open System.Linq
8-
open System.Xml.Linq
96
open System.Text.RegularExpressions
7+
open System.Xml
8+
open System.Xml.Linq
9+
open System.Xml.XPath
1010

1111
let PatchXmlDoc = fun (file: string) ->
1212
let xml = XDocument.Load file

0 commit comments

Comments
 (0)