Skip to content

Commit 9eff589

Browse files
authored
Update to .NET 8.0 (#25)
1 parent 247eb4f commit 9eff589

File tree

14 files changed

+57
-13
lines changed

14 files changed

+57
-13
lines changed

.github/workflows/dotnet.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: .NET test
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
build-linux:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 8.0.x
23+
- name: Build
24+
run: ./build.sh
25+
shell: bash
26+
build-win:
27+
28+
runs-on: windows-latest
29+
30+
steps:
31+
- uses: actions/checkout@v3
32+
- name: Setup .NET
33+
uses: actions/setup-dotnet@v3
34+
with:
35+
dotnet-version: 8.0.x
36+
- name: Build
37+
run: ./build.ps1
38+
shell: pwsh

ReleaseNotes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## 4.2.0
4+
* Add net8.0 support, remove net7.0 support
5+
* Update NuGet.* packages to 6.9.1
6+
37
## 4.1.0
48
* Add net7.0 support
59

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Remove-Artifacts $RepoRoot
2323
Invoke-DotnetMSBuild $RepoRoot ("build\build.proj", "/t:Clean;WriteGitInfo", "/p:Configuration=$Configuration")
2424

2525
# Build Exe
26-
Invoke-DotnetExe $RepoRoot ("publish", "--force", "-r", "win-x64", "-p:PublishSingleFile=true", "-p:PublishTrimmed=false", "--self-contained", "true", "-f", "net6.0", "-o", (Join-Path $RepoRoot "artifacts\publish"), (Join-Path $RepoRoot "\src\NupkgWrench\NupkgWrench.csproj"))
26+
Invoke-DotnetExe $RepoRoot ("publish", "--force", "-r", "win-x64", "-p:PublishSingleFile=true", "-p:PublishTrimmed=false", "--self-contained", "true", "-f", "net8.0", "-o", (Join-Path $RepoRoot "artifacts\publish"), (Join-Path $RepoRoot "\src\NupkgWrench\NupkgWrench.csproj"))
2727

2828
# Restore
2929
Invoke-DotnetMSBuild $RepoRoot ("build\build.proj", "/t:Restore", "/p:Configuration=$Configuration")

build/common/common.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Function Install-DotnetCLI {
2020

2121
Write-Host "Fetching $installDotnet"
2222

23-
wget https://dot.net/v1/dotnet-install.ps1 -OutFile $installDotnet
23+
Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile $installDotnet
2424

2525
& $installDotnet -Channel 6.0 -i $CLIRoot
26-
& $installDotnet -Channel 7.0 -i $CLIRoot
26+
& $installDotnet -Channel 8.0 -i $CLIRoot
2727

2828
if (-not (Test-Path $DotnetExe)) {
2929
Write-Log "Missing $DotnetExe"
@@ -72,7 +72,7 @@ Function Install-NuGetExe {
7272
$nugetDir = Split-Path $nugetExe
7373
New-Item -ItemType Directory -Force -Path $nugetDir
7474

75-
wget https://dist.nuget.org/win-x86-commandline/v6.0.0/nuget.exe -OutFile $nugetExe
75+
Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/v6.9.1/nuget.exe -OutFile $nugetExe
7676
}
7777
}
7878

build/common/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ run_standard_tests()
1818
# Run install.sh
1919
chmod +x .cli/dotnet-install.sh
2020
.cli/dotnet-install.sh -i .cli --channel 6.0
21-
.cli/dotnet-install.sh -i .cli --channel 7.0
21+
.cli/dotnet-install.sh -i .cli --channel 8.0
2222
fi
2323

2424
# Display info

build/common/common.shared.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<PropertyGroup>
1010
<RepositoryRootDirectory>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'README.md'))\</RepositoryRootDirectory>
1111
<RepositoryBuildDirectory>$(RepositoryRootDirectory)build\</RepositoryBuildDirectory>
12+
<RepositoryBuildIconsDirectory>$(RepositoryBuildDirectory)icons\</RepositoryBuildIconsDirectory>
1213
<BuildCommonDirectory>$(RepositoryRootDirectory)build\common\</BuildCommonDirectory>
1314
<SolutionFile>$(RepositoryRootDirectory)$(RepositoryName).sln</SolutionFile>
1415
<ArtifactsDirectory>$(RepositoryRootDirectory)artifacts\</ArtifactsDirectory>

build/common/common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<IsDesktop>true</IsDesktop>
2424
</PropertyGroup>
2525
</When>
26-
<When Condition="$(TargetFramework.Contains('netstandard')) OR $(TargetFramework.Contains('netcoreapp')) OR $(TargetFramework.Contains('net5')) OR $(TargetFramework.Contains('net6')) OR $(TargetFramework.Contains('net7'))">
26+
<When Condition="$(TargetFramework.Contains('netstandard')) OR $(TargetFramework.Contains('netcoreapp')) OR $(TargetFramework.Contains('net5')) OR $(TargetFramework.Contains('net6')) OR $(TargetFramework.Contains('net7')) OR $(TargetFramework.Contains('net8'))">
2727
<PropertyGroup>
2828
<DefineConstants>$(DefineConstants);IS_CORECLR</DefineConstants>
2929
<IsCore>true</IsCore>

build/config.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<Project ToolsVersion="15.0">
22
<!-- Dependency versions -->
33
<PropertyGroup>
4-
<NuGetPackageVersion>6.2.1</NuGetPackageVersion>
5-
<NuGetTestHelpersVersion>2.1.23</NuGetTestHelpersVersion>
4+
<NuGetPackageVersion>6.9.1</NuGetPackageVersion>
5+
<NuGetTestHelpersVersion>2.1.26</NuGetTestHelpersVersion>
66
<CommandLineUtilsVersion>2.0.0</CommandLineUtilsVersion>
77
<FileSystemGlobbingVersion>2.0.0</FileSystemGlobbingVersion>
88
</PropertyGroup>
99

1010
<!-- Config -->
1111
<PropertyGroup>
1212
<RepositoryName>NupkgWrench</RepositoryName>
13+
<PackageIconPath>$(MSBuildThisFileDirectory)/icons/icon.png</PackageIconPath>
1314
</PropertyGroup>
1415

1516
<!-- Nuspec defaults -->

build/icons/icon.png

474 KB
Loading

src/NupkgWrench/NupkgWrench.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
44

55
<PropertyGroup>
6-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
77
</PropertyGroup>
88

99
<PropertyGroup Condition=" '$(PackProjectDotnetTool)' == 'true' ">

0 commit comments

Comments
 (0)