Skip to content

Commit 549d17a

Browse files
Updated to support net7.0, and latest buildalyzer (#809)
1 parent c7d254b commit 549d17a

File tree

9 files changed

+18
-23
lines changed

9 files changed

+18
-23
lines changed

.build/.build.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
<PackageReference Include="ReportGenerator" ExcludeAssets="All" />
1616
<PackageReference Include="JetBrains.ReSharper.GlobalTools" ExcludeAssets="All" />
1717
<ProjectReference Include="../src/Nuke/Rocket.Surgery.Nuke.csproj" />
18-
<PackageReference Include="Microsoft.Build" />
19-
<PackageReference Include="Microsoft.Build.Framework" />
20-
<PackageReference Include="Microsoft.Build.Tasks.Core" />
21-
<PackageReference Include="Microsoft.Build.Utilities.Core" />
2218
</ItemGroup>
2319

2420
<ItemGroup>

.build/Build.CI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static RocketSurgeonGitHubActionsConfiguration CiMiddleware(RocketSurgeon
6868
.AddNugetPublish()
6969
.Jobs.OfType<RocketSurgeonsGithubActionsJob>()
7070
.First(z => z.Name == "Build")
71-
.UseDotNetSdks("3.1", "6.0")
71+
.UseDotNetSdks("6.0", "7.0")
7272
.AddNuGetCache()
7373
// .ConfigureForGitVersion()
7474
.ConfigureStep<CheckoutStep>(step => step.FetchDepth = 0)

.build/Build.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using Rocket.Surgery.Nuke.DotNetCore;
1111

1212
[PublicAPI]
13-
[CheckBuildProjectConfigurations]
1413
[UnsetVisualStudioEnvironmentVariables]
1514
[PackageIcon("https://raw.githubusercontent.com/RocketSurgeonsGuild/graphics/master/png/social-square-thrust-rounded.png")]
1615
[EnsureGitHooks(GitHook.PreCommit)]

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ jobs:
9090
key: "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/Directory.Packages.support.props') }}"
9191
restore-keys: |
9292
${{ runner.os }}-nuget-
93-
- name: 🔨 Use .NET Core 3.1 SDK
94-
uses: actions/[email protected]
95-
with:
96-
dotnet-version: '3.1.x'
9793
- name: 🔨 Use .NET Core 6.0 SDK
9894
uses: actions/[email protected]
9995
with:
10096
dotnet-version: '6.0.x'
97+
- name: 🔨 Use .NET Core 7.0 SDK
98+
uses: actions/[email protected]
99+
with:
100+
dotnet-version: '7.0.x'
101101
- name: 🎁 dotnet tool restore
102102
run: |
103103
dotnet tool restore

Directory.Packages.props

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,10 @@
2525
<PackageVersion Include="ReportGenerator" Version="5.1.12" />
2626
<PackageVersion Include="YamlDotNet" Version="12.2.1" />
2727
<PackageVersion Include="JetBrains.ReSharper.GlobalTools" Version="2022.3.0" />
28-
<!-- <PackageVersion Include="JetBrains.ReSharper.GlobalTools" Version="2020.3.0-eap05"/>-->
29-
<PackageVersion Include="Microsoft.Build" Version="17.4.0" />
30-
<PackageVersion Include="Microsoft.Build.Framework" Version="17.4.0" />
31-
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.4.0" />
32-
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.4.0" />
3328
<PackageVersion Include="LiquidTestReports.Core" Version="1.3.2-beta" />
3429
<PackageVersion Include="System.Collections.Immutable" Version="6.0.0" />
3530
<PackageVersion Include="System.Interactive" Version="6.0.1" />
3631
<PackageVersion Include="System.Interactive.Async" Version="6.0.1" />
37-
3832
</ItemGroup>
3933
<ItemGroup>
4034
<PackageVersion Include="Bogus" Version="34.0.2" />

src/Nuke/Extensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace Rocket.Surgery.Nuke;
22

3+
#pragma warning disable CA1724
34
/// <summary>
45
/// Extension methods for working with nuke build tasks
56
/// </summary>

src/Nuke/Helpers.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
namespace Rocket.Surgery.Nuke;
22

3+
#pragma warning disable CA1724
4+
/// <summary>
5+
/// Helpers for Nuke builds
6+
/// </summary>
37
public static class Helpers
48
{
9+
/// <summary>
10+
/// Determine if a dotnet tool is installed in the dotnet-tools.json
11+
/// </summary>
12+
/// <param name="nugetPackageName"></param>
13+
/// <returns></returns>
514
public static bool IsDotnetToolInstalled(string nugetPackageName)
615
{
716
var dotnetTools = Path.Combine(NukeBuild.RootDirectory, ".config/dotnet-tools.json");

src/Nuke/Rocket.Surgery.Nuke.csproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
44
<NoWarn>$(NoWarn);CS0436</NoWarn>
55
<!-- This has to be turned on because in Nuke.Common.props it is turned off to false, which causes build failures when writing to the same dll multiple times with cross targeting -->
66
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
@@ -11,11 +11,7 @@
1111
<PackageReference Include="YamlDotNet" />
1212
<PackageReference Include="Buildalyzer" />
1313
<PackageReference Include="Humanizer.Core" />
14-
<PackageReference Include="Microsoft.Build" />
15-
<PackageReference Include="Microsoft.Build.Framework" />
16-
<PackageReference Include="Microsoft.Build.Tasks.Core" />
17-
<PackageReference Include="Microsoft.Build.Utilities.Core" />
18-
<PackageReference Include="LiquidTestReports.Core" />
14+
<PackageReference Include="LiquidTestReports.Core" />
1915
</ItemGroup>
2016
<ItemGroup>
2117
<None Include="build/*.*" Pack="true" PackagePath="build" />

test/Nuke.Tests/Rocket.Surgery.Nuke.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
44
</PropertyGroup>
55
<ItemGroup>
66
<ProjectReference Include="..\..\src\Nuke\Rocket.Surgery.Nuke.csproj" />

0 commit comments

Comments
 (0)