diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 000000000..3823ed436
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,88 @@
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/_build.csproj b/build/_build.csproj
index b62c736dc..8de4e02f5 100644
--- a/build/_build.csproj
+++ b/build/_build.csproj
@@ -10,6 +10,7 @@
CS0649;CS0169
.\..
1
+ false
diff --git a/source/Directory.Build.props b/source/Directory.Build.props
index c67af9847..3461e7ae7 100644
--- a/source/Directory.Build.props
+++ b/source/Directory.Build.props
@@ -36,19 +36,19 @@
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/source/Nuke.Build.Shared/Nuke.Build.Shared.csproj b/source/Nuke.Build.Shared/Nuke.Build.Shared.csproj
index 360fe16cb..5925ae70e 100644
--- a/source/Nuke.Build.Shared/Nuke.Build.Shared.csproj
+++ b/source/Nuke.Build.Shared/Nuke.Build.Shared.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/source/Nuke.Build/Nuke.Build.csproj b/source/Nuke.Build/Nuke.Build.csproj
index 746e8dee7..94c5801ed 100644
--- a/source/Nuke.Build/Nuke.Build.csproj
+++ b/source/Nuke.Build/Nuke.Build.csproj
@@ -17,13 +17,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/source/Nuke.Common/Nuke.Common.csproj b/source/Nuke.Common/Nuke.Common.csproj
index 006c19995..0ab89aea1 100644
--- a/source/Nuke.Common/Nuke.Common.csproj
+++ b/source/Nuke.Common/Nuke.Common.csproj
@@ -23,11 +23,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj b/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj
index 0ecfb735b..a47a42bc8 100644
--- a/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj
+++ b/source/Nuke.GlobalTool/Nuke.GlobalTool.csproj
@@ -14,10 +14,10 @@
-
-
-
-
+
+
+
+
diff --git a/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj b/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj
index 09e9ae94c..e2e4b0b6b 100644
--- a/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj
+++ b/source/Nuke.MSBuildTasks/Nuke.MSBuildTasks.csproj
@@ -11,13 +11,13 @@
-
+
-
-
+
+
diff --git a/source/Nuke.ProjectModel.Tests/ProjectModelTest.cs b/source/Nuke.ProjectModel.Tests/ProjectModelTest.cs
index f50dbda4a..4553d94b1 100644
--- a/source/Nuke.ProjectModel.Tests/ProjectModelTest.cs
+++ b/source/Nuke.ProjectModel.Tests/ProjectModelTest.cs
@@ -37,10 +37,10 @@ public void MSBuildProjectTest()
var solution = SolutionModelTasks.ParseSolution(SolutionFile);
var project = solution.Projects.Single(x => x.Name == "Nuke.ProjectModel");
- var msbuildProject = project.GetMSBuildProject(targetFramework: "net6.0");
+ var msbuildProject = project.GetMSBuildProject(targetFramework: "net8.0");
- var package = msbuildProject.GetItems("PackageReference").FirstOrDefault(x => x.EvaluatedInclude == "Microsoft.Build");
+ var package = msbuildProject.GetItems("PackageVersion").FirstOrDefault(x => x.EvaluatedInclude == "Microsoft.Build");
package.Should().NotBeNull();
- package.GetMetadataValue("Version").Should().Be("16.9.0");
+ package.GetMetadataValue("Version").Should().Be("17.9.5");
}
}
diff --git a/source/Nuke.ProjectModel/Nuke.ProjectModel.csproj b/source/Nuke.ProjectModel/Nuke.ProjectModel.csproj
index d3875675f..0d21f36d4 100644
--- a/source/Nuke.ProjectModel/Nuke.ProjectModel.csproj
+++ b/source/Nuke.ProjectModel/Nuke.ProjectModel.csproj
@@ -11,28 +11,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/source/Nuke.ProjectModel/Project.Misc.cs b/source/Nuke.ProjectModel/Project.Misc.cs
index 0d15be4f4..f402fc7fe 100644
--- a/source/Nuke.ProjectModel/Project.Misc.cs
+++ b/source/Nuke.ProjectModel/Project.Misc.cs
@@ -58,7 +58,10 @@ public static bool HasPackageReference(this Project project, string packageId)
///
public static string GetPackageReferenceVersion(this Project project, string packageId)
{
- return project.GetItemMetadataSingleOrDefault("PackageReference", packageId, "Version");
+ var version = project.GetItemMetadataSingleOrDefault("PackageReference", packageId, "Version");
+ return version == string.Empty
+ ? project.GetItemMetadataSingleOrDefault("PackageVersion", packageId, "Version")
+ : null;
}
[CanBeNull]
diff --git a/source/Nuke.SourceGenerators.Tests/Nuke.SourceGenerators.Tests.csproj b/source/Nuke.SourceGenerators.Tests/Nuke.SourceGenerators.Tests.csproj
index 906167b4e..65a4b6cb0 100644
--- a/source/Nuke.SourceGenerators.Tests/Nuke.SourceGenerators.Tests.csproj
+++ b/source/Nuke.SourceGenerators.Tests/Nuke.SourceGenerators.Tests.csproj
@@ -12,10 +12,10 @@
-
-
-
-
+
+
+
+
diff --git a/source/Nuke.SourceGenerators/Nuke.SourceGenerators.csproj b/source/Nuke.SourceGenerators/Nuke.SourceGenerators.csproj
index 381f687d7..3d4e219a5 100644
--- a/source/Nuke.SourceGenerators/Nuke.SourceGenerators.csproj
+++ b/source/Nuke.SourceGenerators/Nuke.SourceGenerators.csproj
@@ -19,9 +19,9 @@
-
-
-
+
+
+
diff --git a/source/Nuke.Tooling.Generator/Nuke.Tooling.Generator.csproj b/source/Nuke.Tooling.Generator/Nuke.Tooling.Generator.csproj
index 713acf1db..089faf871 100644
--- a/source/Nuke.Tooling.Generator/Nuke.Tooling.Generator.csproj
+++ b/source/Nuke.Tooling.Generator/Nuke.Tooling.Generator.csproj
@@ -6,11 +6,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/source/Nuke.Tooling/Nuke.Tooling.csproj b/source/Nuke.Tooling/Nuke.Tooling.csproj
index 002f32571..e6e3083d2 100644
--- a/source/Nuke.Tooling/Nuke.Tooling.csproj
+++ b/source/Nuke.Tooling/Nuke.Tooling.csproj
@@ -9,9 +9,9 @@
-
-
-
+
+
+
diff --git a/source/Nuke.Utilities.IO.Compression/Nuke.Utilities.IO.Compression.csproj b/source/Nuke.Utilities.IO.Compression/Nuke.Utilities.IO.Compression.csproj
index 7cb2fc6a5..7fe82a8c6 100644
--- a/source/Nuke.Utilities.IO.Compression/Nuke.Utilities.IO.Compression.csproj
+++ b/source/Nuke.Utilities.IO.Compression/Nuke.Utilities.IO.Compression.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/source/Nuke.Utilities.IO.Globbing/Nuke.Utilities.IO.Globbing.csproj b/source/Nuke.Utilities.IO.Globbing/Nuke.Utilities.IO.Globbing.csproj
index 26639f272..a43acbc68 100644
--- a/source/Nuke.Utilities.IO.Globbing/Nuke.Utilities.IO.Globbing.csproj
+++ b/source/Nuke.Utilities.IO.Globbing/Nuke.Utilities.IO.Globbing.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/source/Nuke.Utilities.Net/Nuke.Utilities.Net.csproj b/source/Nuke.Utilities.Net/Nuke.Utilities.Net.csproj
index 39d63aba3..6f3aeb095 100644
--- a/source/Nuke.Utilities.Net/Nuke.Utilities.Net.csproj
+++ b/source/Nuke.Utilities.Net/Nuke.Utilities.Net.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/source/Nuke.Utilities.Text.Json/Nuke.Utilities.Text.Json.csproj b/source/Nuke.Utilities.Text.Json/Nuke.Utilities.Text.Json.csproj
index c13a6dd63..938d355f1 100644
--- a/source/Nuke.Utilities.Text.Json/Nuke.Utilities.Text.Json.csproj
+++ b/source/Nuke.Utilities.Text.Json/Nuke.Utilities.Text.Json.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/source/Nuke.Utilities.Text.Yaml/Nuke.Utilities.Text.Yaml.csproj b/source/Nuke.Utilities.Text.Yaml/Nuke.Utilities.Text.Yaml.csproj
index 1cd42cb3d..aefd1f0b9 100644
--- a/source/Nuke.Utilities.Text.Yaml/Nuke.Utilities.Text.Yaml.csproj
+++ b/source/Nuke.Utilities.Text.Yaml/Nuke.Utilities.Text.Yaml.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/source/Nuke.Utilities/Nuke.Utilities.csproj b/source/Nuke.Utilities/Nuke.Utilities.csproj
index 1b9bf611e..c4ed59fc1 100644
--- a/source/Nuke.Utilities/Nuke.Utilities.csproj
+++ b/source/Nuke.Utilities/Nuke.Utilities.csproj
@@ -5,7 +5,7 @@
-
+