Skip to content

Commit

Permalink
Fix issue with access loop for the extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed Jun 25, 2023
1 parent eef4cf7 commit aa3e742
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
using Nuke.Common.ProjectModel;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.NerdbankGitVersioning;
using Nuke.Common.Utilities.Collections;
using Nuke.Common.Tools.DotNet;
using Serilog;
using CP.Nuke.BuildTools;
using CP.BuildTools;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using Nuke.Common.Tools.DotNet;

[GitHubActions(
"BuildOnly",
Expand Down
7 changes: 4 additions & 3 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace></RootNamespace>
<NoWarn>$(NoWarn);CS0649;CS0169;CA1822;IDE1006</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -11,12 +12,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageReference Include="Nuke.Common" Version="7.0.2" />
<Compile Include="..\src\CP.Nuke.BuildTools\Extensions.cs" Link="Extensions.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\src\CP.Nuke.BuildTools\CP.Nuke.BuildTools.csproj" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" />
<PackageReference Include="Nuke.Common" Version="7.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/CP.Nuke.BuildTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionSetup", "SolutionSe
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
..\stylecop.json = ..\stylecop.json
..\version.json = ..\version.json
EndProjectSection
EndProject
Global
Expand Down
6 changes: 3 additions & 3 deletions src/CP.Nuke.BuildTools/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Nuke.Common.Tooling;
using Serilog;

namespace CP.Nuke.BuildTools
namespace CP.BuildTools
{
/// <summary>
/// Extensions.
Expand Down Expand Up @@ -62,15 +62,15 @@ public static void RestoreProjectWorkload(this Project project) =>
/// Restores the solution workloads.
/// </summary>
/// <param name="solution">The solution.</param>
public static void RestoreSolutionWorkloads(this Solution solution) =>
public static void RestoreSolutionWorkloads(this Nuke.Common.ProjectModel.Solution solution) =>
ProcessTasks.StartShell($"dotnet workload restore {solution}").AssertZeroExitCode();

/// <summary>
/// Gets the packable projects.
/// </summary>
/// <param name="solution">The solution.</param>
/// <returns>A List of Projects.</returns>
public static List<Project>? GetPackableProjects(this Solution solution) =>
public static List<Project>? GetPackableProjects(this Nuke.Common.ProjectModel.Solution solution) =>
solution?.AllProjects.Where(x => x.GetProperty<bool>("IsPackable")).ToList();

/// <summary>
Expand Down

0 comments on commit aa3e742

Please sign in to comment.