lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 01/29: Patched SolutionDir MSBuild property so it works for dotnet.exe commands and updated project imports to utilize it
Date Tue, 09 Jul 2019 21:29:17 GMT
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit b6d0cff72ddc893b8ceb7f85e898a11d2f68ab37
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Sat Jul 6 21:45:00 2019 +0700

    Patched SolutionDir MSBuild property so it works for dotnet.exe commands and updated project imports to utilize it
---
 Lucene.Net.sln                                     |  6 +++++
 src/Directory.Build.props                          | 29 ++++++++++++++++++++++
 .../Lucene.Net.Analysis.Common.csproj              |  4 +--
 .../Lucene.Net.Analysis.Kuromoji.csproj            |  4 +--
 .../Lucene.Net.Analysis.Phonetic.csproj            |  4 +--
 .../Lucene.Net.Analysis.SmartCn.csproj             |  4 +--
 .../Lucene.Net.Analysis.Stempel.csproj             |  4 +--
 .../Lucene.Net.Benchmark.csproj                    |  4 +--
 .../Lucene.Net.Classification.csproj               |  4 +--
 src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj     |  4 +--
 src/Lucene.Net.Demo/Lucene.Net.Demo.csproj         |  4 +--
 .../Lucene.Net.Expressions.csproj                  |  4 +--
 src/Lucene.Net.Facet/Lucene.Net.Facet.csproj       |  4 +--
 src/Lucene.Net.Grouping/Lucene.Net.Grouping.csproj |  4 +--
 .../Lucene.Net.Highlighter.csproj                  |  4 +--
 src/Lucene.Net.Join/Lucene.Net.Join.csproj         |  4 +--
 src/Lucene.Net.Memory/Lucene.Net.Memory.csproj     |  4 +--
 src/Lucene.Net.Misc/Lucene.Net.Misc.csproj         |  4 +--
 src/Lucene.Net.Queries/Lucene.Net.Queries.csproj   |  4 +--
 .../Lucene.Net.QueryParser.csproj                  |  4 +--
 .../Lucene.Net.Replicator.csproj                   |  4 +--
 src/Lucene.Net.Sandbox/Lucene.Net.Sandbox.csproj   |  4 +--
 src/Lucene.Net.Spatial/Lucene.Net.Spatial.csproj   |  4 +--
 src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj   |  4 +--
 .../Lucene.Net.TestFramework.csproj                |  4 +--
 .../Lucene.Net.Tests.Analysis.Common.csproj        |  6 ++---
 .../Lucene.Net.Tests.Analysis.Kuromoji.csproj      |  6 ++---
 .../Lucene.Net.Tests.Analysis.Phonetic.csproj      |  6 ++---
 .../Lucene.Net.Tests.Analysis.SmartCn.csproj       |  6 ++---
 .../Lucene.Net.Tests.Analysis.Stempel.csproj       |  6 ++---
 .../Lucene.Net.Tests.Benchmark.csproj              |  6 ++---
 .../Lucene.Net.Tests.Classification.csproj         |  6 ++---
 .../Lucene.Net.Tests.Codecs.csproj                 |  6 ++---
 .../Lucene.Net.Tests.Demo.csproj                   |  6 ++---
 .../Lucene.Net.Tests.Expressions.csproj            |  6 ++---
 .../Lucene.Net.Tests.Facet.csproj                  |  6 ++---
 .../Lucene.Net.Tests.Grouping.csproj               |  6 ++---
 .../Lucene.Net.Tests.Highlighter.csproj            |  6 ++---
 .../Lucene.Net.Tests.Join.csproj                   |  6 ++---
 .../Lucene.Net.Tests.Memory.csproj                 |  6 ++---
 .../Lucene.Net.Tests.Misc.csproj                   |  6 ++---
 .../Lucene.Net.Tests.Queries.csproj                |  6 ++---
 .../Lucene.Net.Tests.QueryParser.csproj            |  6 ++---
 .../Lucene.Net.Tests.Replicator.csproj             |  6 ++---
 .../Lucene.Net.Tests.Sandbox.csproj                |  6 ++---
 .../Lucene.Net.Tests.Spatial.csproj                |  6 ++---
 .../Lucene.Net.Tests.Suggest.csproj                |  6 ++---
 src/Lucene.Net.Tests/Lucene.Net.Tests.csproj       |  6 ++---
 src/Lucene.Net/Lucene.Net.csproj                   |  4 +--
 src/dotnet/Directory.Build.props                   | 29 ++++++++++++++++++++++
 src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj    |  4 +--
 .../Lucene.Net.Replicator.AspNetCore.csproj        |  4 +--
 .../Lucene.Net.Tests.ICU.csproj                    |  6 ++---
 src/dotnet/tools/Directory.Build.props             | 29 ++++++++++++++++++++++
 .../Lucene.Net.Tests.Cli.csproj                    |  4 +--
 src/dotnet/tools/lucene-cli/lucene-cli.csproj      |  4 +--
 56 files changed, 221 insertions(+), 128 deletions(-)

diff --git a/Lucene.Net.sln b/Lucene.Net.sln
index 1991479..ab29568 100644
--- a/Lucene.Net.sln
+++ b/Lucene.Net.sln
@@ -22,6 +22,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 VisualStudioVersion = 15.0.26730.8
 MinimumVisualStudioVersion = 15.0.26730.8
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnet", "dotnet", "{8CA61D33-3590-4024-A304-7B1F75B50653}"
+	ProjectSection(SolutionItems) = preProject
+		src\dotnet\Directory.Build.props = src\dotnet\Directory.Build.props
+	EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{4016BDAB-6C33-4D1E-9439-57B416EA45D5}"
 	ProjectSection(SolutionItems) = preProject
@@ -33,6 +36,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{4016BDAB
 	EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{4DF7EACE-2B25-43F6-B558-8520BF20BD76}"
+	ProjectSection(SolutionItems) = preProject
+		src\dotnet\tools\Directory.Build.props = src\dotnet\tools\Directory.Build.props
+	EndProjectSection
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lucene.Net", "src\Lucene.Net\Lucene.Net.csproj", "{3A0AA37E-2B7B-4416-B528-DA4E0E6A6706}"
 EndProject
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 0000000..7cb8e9e
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,29 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project>
+  <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
+
+  <PropertyGroup>
+    <!-- According to the docs (https://docs.microsoft.com/en-us/cpp/build/reference/common-macros-for-build-commands-and-properties?view=vs-2019), the 
+      SolutionDir is only available when running in the IDE, so we patch to ensure it also works when using dotnet.exe -->
+    <SolutionDir Condition=" '$(SolutionDir)' == '' ">$(MSBuildThisFileDirectory)../</SolutionDir>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
index f562916..67848f3 100644
--- a/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
+++ b/src/Lucene.Net.Analysis.Common/Lucene.Net.Analysis.Common.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj b/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj
index 500aaec..7a1e53e 100644
--- a/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj
+++ b/src/Lucene.Net.Analysis.Kuromoji/Lucene.Net.Analysis.Kuromoji.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Analysis.Phonetic/Lucene.Net.Analysis.Phonetic.csproj b/src/Lucene.Net.Analysis.Phonetic/Lucene.Net.Analysis.Phonetic.csproj
index 910f161..7224972 100644
--- a/src/Lucene.Net.Analysis.Phonetic/Lucene.Net.Analysis.Phonetic.csproj
+++ b/src/Lucene.Net.Analysis.Phonetic/Lucene.Net.Analysis.Phonetic.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Analysis.SmartCn/Lucene.Net.Analysis.SmartCn.csproj b/src/Lucene.Net.Analysis.SmartCn/Lucene.Net.Analysis.SmartCn.csproj
index 5231ba2..3b72999 100644
--- a/src/Lucene.Net.Analysis.SmartCn/Lucene.Net.Analysis.SmartCn.csproj
+++ b/src/Lucene.Net.Analysis.SmartCn/Lucene.Net.Analysis.SmartCn.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj b/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
index 9d9eb48..d9191d7 100644
--- a/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
+++ b/src/Lucene.Net.Analysis.Stempel/Lucene.Net.Analysis.Stempel.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj b/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj
index 67c6321..8cc8a2b 100644
--- a/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj
+++ b/src/Lucene.Net.Benchmark/Lucene.Net.Benchmark.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
   
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Classification/Lucene.Net.Classification.csproj b/src/Lucene.Net.Classification/Lucene.Net.Classification.csproj
index e950a94..d251b45 100644
--- a/src/Lucene.Net.Classification/Lucene.Net.Classification.csproj
+++ b/src/Lucene.Net.Classification/Lucene.Net.Classification.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
index be2532c..73e1d52 100644
--- a/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
+++ b/src/Lucene.Net.Codecs/Lucene.Net.Codecs.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Demo/Lucene.Net.Demo.csproj b/src/Lucene.Net.Demo/Lucene.Net.Demo.csproj
index 281dfc5..e255de8 100644
--- a/src/Lucene.Net.Demo/Lucene.Net.Demo.csproj
+++ b/src/Lucene.Net.Demo/Lucene.Net.Demo.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Expressions/Lucene.Net.Expressions.csproj b/src/Lucene.Net.Expressions/Lucene.Net.Expressions.csproj
index 6b3767f..da3e43a 100644
--- a/src/Lucene.Net.Expressions/Lucene.Net.Expressions.csproj
+++ b/src/Lucene.Net.Expressions/Lucene.Net.Expressions.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj b/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj
index 0b2d7e6..e88d061 100644
--- a/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj
+++ b/src/Lucene.Net.Facet/Lucene.Net.Facet.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Grouping/Lucene.Net.Grouping.csproj b/src/Lucene.Net.Grouping/Lucene.Net.Grouping.csproj
index e901749..07c9e74 100644
--- a/src/Lucene.Net.Grouping/Lucene.Net.Grouping.csproj
+++ b/src/Lucene.Net.Grouping/Lucene.Net.Grouping.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj b/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj
index b019de9..e01905f 100644
--- a/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj
+++ b/src/Lucene.Net.Highlighter/Lucene.Net.Highlighter.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Join/Lucene.Net.Join.csproj b/src/Lucene.Net.Join/Lucene.Net.Join.csproj
index 185cdcb..990ea0b 100644
--- a/src/Lucene.Net.Join/Lucene.Net.Join.csproj
+++ b/src/Lucene.Net.Join/Lucene.Net.Join.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Memory/Lucene.Net.Memory.csproj b/src/Lucene.Net.Memory/Lucene.Net.Memory.csproj
index 30231ae..0eca13a 100644
--- a/src/Lucene.Net.Memory/Lucene.Net.Memory.csproj
+++ b/src/Lucene.Net.Memory/Lucene.Net.Memory.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Misc/Lucene.Net.Misc.csproj b/src/Lucene.Net.Misc/Lucene.Net.Misc.csproj
index c38bde9..a3e83f6 100644
--- a/src/Lucene.Net.Misc/Lucene.Net.Misc.csproj
+++ b/src/Lucene.Net.Misc/Lucene.Net.Misc.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Queries/Lucene.Net.Queries.csproj b/src/Lucene.Net.Queries/Lucene.Net.Queries.csproj
index 314568a..785154c 100644
--- a/src/Lucene.Net.Queries/Lucene.Net.Queries.csproj
+++ b/src/Lucene.Net.Queries/Lucene.Net.Queries.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
index 468131c..7d0a366 100644
--- a/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
+++ b/src/Lucene.Net.QueryParser/Lucene.Net.QueryParser.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Replicator/Lucene.Net.Replicator.csproj b/src/Lucene.Net.Replicator/Lucene.Net.Replicator.csproj
index d663475..25c3902 100644
--- a/src/Lucene.Net.Replicator/Lucene.Net.Replicator.csproj
+++ b/src/Lucene.Net.Replicator/Lucene.Net.Replicator.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Sandbox/Lucene.Net.Sandbox.csproj b/src/Lucene.Net.Sandbox/Lucene.Net.Sandbox.csproj
index e097612..b347dba 100644
--- a/src/Lucene.Net.Sandbox/Lucene.Net.Sandbox.csproj
+++ b/src/Lucene.Net.Sandbox/Lucene.Net.Sandbox.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Spatial/Lucene.Net.Spatial.csproj b/src/Lucene.Net.Spatial/Lucene.Net.Spatial.csproj
index a8f81c7..de3df43 100644
--- a/src/Lucene.Net.Spatial/Lucene.Net.Spatial.csproj
+++ b/src/Lucene.Net.Spatial/Lucene.Net.Spatial.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj b/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj
index eea2630..cfd8950 100644
--- a/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj
+++ b/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index d414b3f..dcf12e7 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
index ef17941..ff5f81d 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj b/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj
index 2f251a3..a8f0409 100644
--- a/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Kuromoji/Lucene.Net.Tests.Analysis.Kuromoji.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj b/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj
index 3f5a803..a8687fb 100644
--- a/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Phonetic/Lucene.Net.Tests.Analysis.Phonetic.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj b/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj
index 202d907..cbc3d35 100644
--- a/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj
+++ b/src/Lucene.Net.Tests.Analysis.SmartCn/Lucene.Net.Tests.Analysis.SmartCn.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj b/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
index 988e9e9..1855b82 100644
--- a/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Stempel/Lucene.Net.Tests.Analysis.Stempel.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj b/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj
index b673582..ae8a4bd 100644
--- a/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj
+++ b/src/Lucene.Net.Tests.Benchmark/Lucene.Net.Tests.Benchmark.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj b/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj
index 432f4fb..21a2171 100644
--- a/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj
+++ b/src/Lucene.Net.Tests.Classification/Lucene.Net.Tests.Classification.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
index 4a02eb1..00aa964 100644
--- a/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
+++ b/src/Lucene.Net.Tests.Codecs/Lucene.Net.Tests.Codecs.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj b/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj
index ebb4ca7..375e7d2 100644
--- a/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj
+++ b/src/Lucene.Net.Tests.Demo/Lucene.Net.Tests.Demo.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
index 0fb9c1c..71daf18 100644
--- a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
+++ b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj b/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj
index 60bf222..6e06b72 100644
--- a/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj
+++ b/src/Lucene.Net.Tests.Facet/Lucene.Net.Tests.Facet.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj b/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj
index 62ec7d6..44924ec 100644
--- a/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj
+++ b/src/Lucene.Net.Tests.Grouping/Lucene.Net.Tests.Grouping.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj b/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
index c6852b3..b7ae873 100644
--- a/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
+++ b/src/Lucene.Net.Tests.Highlighter/Lucene.Net.Tests.Highlighter.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj b/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj
index 1d34313..a1a0f26 100644
--- a/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj
+++ b/src/Lucene.Net.Tests.Join/Lucene.Net.Tests.Join.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj b/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj
index fa1466c..e562a58 100644
--- a/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj
+++ b/src/Lucene.Net.Tests.Memory/Lucene.Net.Tests.Memory.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj b/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj
index 9006786..ac42151 100644
--- a/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj
+++ b/src/Lucene.Net.Tests.Misc/Lucene.Net.Tests.Misc.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj b/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj
index afcd30f..79302f8 100644
--- a/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj
+++ b/src/Lucene.Net.Tests.Queries/Lucene.Net.Tests.Queries.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj b/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj
index 6f23eb2..8c0fe07 100644
--- a/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj
+++ b/src/Lucene.Net.Tests.QueryParser/Lucene.Net.Tests.QueryParser.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj b/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj
index 6470320..22cd711 100644
--- a/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj
+++ b/src/Lucene.Net.Tests.Replicator/Lucene.Net.Tests.Replicator.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj b/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj
index a87a815..2e756f3 100644
--- a/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj
+++ b/src/Lucene.Net.Tests.Sandbox/Lucene.Net.Tests.Sandbox.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj b/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj
index 54b33cc..d28f8f0 100644
--- a/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj
+++ b/src/Lucene.Net.Tests.Spatial/Lucene.Net.Tests.Spatial.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj b/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj
index c5a2690..6938c79 100644
--- a/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj
+++ b/src/Lucene.Net.Tests.Suggest/Lucene.Net.Tests.Suggest.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
index 13a16d7..82ff392 100644
--- a/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
+++ b/src/Lucene.Net.Tests/Lucene.Net.Tests.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp2.0;netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/Lucene.Net/Lucene.Net.csproj b/src/Lucene.Net/Lucene.Net.csproj
index 8825f84..08edbfe 100644
--- a/src/Lucene.Net/Lucene.Net.csproj
+++ b/src/Lucene.Net/Lucene.Net.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
diff --git a/src/dotnet/Directory.Build.props b/src/dotnet/Directory.Build.props
new file mode 100644
index 0000000..b299cb2
--- /dev/null
+++ b/src/dotnet/Directory.Build.props
@@ -0,0 +1,29 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project>
+  <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
+
+  <PropertyGroup>
+    <!-- According to the docs (https://docs.microsoft.com/en-us/cpp/build/reference/common-macros-for-build-commands-and-properties?view=vs-2019), the 
+      SolutionDir is only available when running in the IDE, so we patch to ensure it also works when using dotnet.exe -->
+    <SolutionDir>$(MSBuildThisFileDirectory)../../</SolutionDir>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj
index bbdbd99..af619d7 100644
--- a/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj
+++ b/src/dotnet/Lucene.Net.ICU/Lucene.Net.ICU.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net45</TargetFrameworks>
diff --git a/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj b/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj
index 2aed228..f2893ad 100644
--- a/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj
+++ b/src/dotnet/Lucene.Net.Replicator.AspNetCore/Lucene.Net.Replicator.AspNetCore.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
   
   <PropertyGroup>
     <TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
diff --git a/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj b/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj
index a18ac09..8bae0a0 100644
--- a/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj
+++ b/src/dotnet/Lucene.Net.Tests.ICU/Lucene.Net.Tests.ICU.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,8 +21,8 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\..\TestTargetFramework.proj" />
-  <Import Project="..\..\..\Version.proj" />
+  <Import Project="$(SolutionDir)TestTargetFramework.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <!--<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>-->
diff --git a/src/dotnet/tools/Directory.Build.props b/src/dotnet/tools/Directory.Build.props
new file mode 100644
index 0000000..60fd836
--- /dev/null
+++ b/src/dotnet/tools/Directory.Build.props
@@ -0,0 +1,29 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project>
+  <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
+
+  <PropertyGroup>
+    <!-- According to the docs (https://docs.microsoft.com/en-us/cpp/build/reference/common-macros-for-build-commands-and-properties?view=vs-2019), the 
+      SolutionDir is only available when running in the IDE, so we patch to ensure it also works when using dotnet.exe -->
+    <SolutionDir>$(MSBuildThisFileDirectory)../../../</SolutionDir>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj
index faa72f0..f1d4d83 100644
--- a/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj
+++ b/src/dotnet/tools/Lucene.Net.Tests.Cli/Lucene.Net.Tests.Cli.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->  
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <TargetFramework>netcoreapp2.0</TargetFramework>
diff --git a/src/dotnet/tools/lucene-cli/lucene-cli.csproj b/src/dotnet/tools/lucene-cli/lucene-cli.csproj
index eb4bb66..5f1d72f 100644
--- a/src/dotnet/tools/lucene-cli/lucene-cli.csproj
+++ b/src/dotnet/tools/lucene-cli/lucene-cli.csproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
 
  Licensed to the Apache Software Foundation (ASF) under one
@@ -21,7 +21,7 @@
 -->
 <Project Sdk="Microsoft.NET.Sdk">
 
-  <Import Project="..\..\..\..\Version.proj" />
+  <Import Project="$(SolutionDir)Version.proj" />
 
   <PropertyGroup>
     <TargetFramework>netcoreapp2.0</TargetFramework>


Mime
View raw message