diff --git a/build/Build.cs b/build/Build.cs
index 764bae9..07bbe24 100644
--- a/build/Build.cs
+++ b/build/Build.cs
@@ -10,7 +10,6 @@
using static Nuke.Common.IO.FileSystemTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
-[CheckBuildProjectConfigurations]
[UnsetVisualStudioEnvironmentVariables]
class Build : NukeBuild
{
@@ -26,7 +25,7 @@ class Build : NukeBuild
[Parameter("Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable " + CiBranchNameEnvVariable + ".", Name = CiBranchNameEnvVariable)]
string BranchName { get; set; }
- [OctoVersion(BranchParameter = nameof(BranchName), AutoDetectBranchParameter = nameof(AutoDetectBranch))]
+ [OctoVersion(BranchMember = nameof(BranchName), AutoDetectBranchMember = nameof(AutoDetectBranch))]
public OctoVersionInfo OctoVersionInfo;
AbsolutePath SourceDirectory => RootDirectory / "source";
@@ -37,8 +36,8 @@ class Build : NukeBuild
.Before(Restore)
.Executes(() =>
{
- SourceDirectory.GlobDirectories("**/bin", "**/obj", "**/TestResults").ForEach(DeleteDirectory);
- EnsureCleanDirectory(ArtifactsDirectory);
+ SourceDirectory.GlobDirectories("**/bin", "**/obj", "**/TestResults").ForEach(x => x.DeleteDirectory());
+ ArtifactsDirectory.CreateOrCleanDirectory();
});
Target Restore => _ => _
@@ -90,7 +89,7 @@ class Build : NukeBuild
.DependsOn(Pack)
.Executes(() =>
{
- EnsureExistingDirectory(LocalPackagesDirectory);
+ LocalPackagesDirectory.CreateDirectory();
CopyFileToDirectory(ArtifactsDirectory / $"Octopus.Time.{OctoVersionInfo.FullSemVer}.nupkg",
LocalPackagesDirectory, FileExistsPolicy.Overwrite);
});
diff --git a/build/_build.csproj b/build/_build.csproj
index ee38886..e0beaaf 100644
--- a/build/_build.csproj
+++ b/build/_build.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net8.0
CS0649;CS0169
..
..
@@ -10,7 +10,7 @@
-
+
diff --git a/global.json b/global.json
index 539c536..088e8bd 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "6.0.300",
+ "version": "8.0.100",
"rollForward": "latestFeature"
}
}