Skip to content

Commit 0db94b6

Browse files
authored
add net9.0 support (#26)
1 parent 9eff589 commit 0db94b6

File tree

10 files changed

+23
-68
lines changed

10 files changed

+23
-68
lines changed

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.3.0
4+
* Add net9.0 support
5+
* Update NuGet.* packages to 6.12.1
6+
37
## 4.2.0
48
* Add net8.0 support, remove net7.0 support
59
* Update NuGet.* packages to 6.9.1

build.ps1

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ pushd $RepoRoot
1515
# Download tools
1616
Install-CommonBuildTools $RepoRoot
1717

18-
# Run dotnet-format to apply style fixes or fail on CI builds
19-
Invoke-DotnetFormat $RepoRoot
20-
2118
# Clean and write git info
2219
Remove-Artifacts $RepoRoot
2320
Invoke-DotnetMSBuild $RepoRoot ("build\build.proj", "/t:Clean;WriteGitInfo", "/p:Configuration=$Configuration")
@@ -43,6 +40,6 @@ if (-not $SkipPack)
4340

4441
# Run build.proj
4542
Invoke-DotnetMSBuild $RepoRoot ("build\build.proj", "/t:$buildTargets", "/p:Configuration=$Configuration")
46-
43+
4744
popd
4845
Write-Host "Success!"

build/build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project ToolsVersion="15.0" DefaultTargets="Run">
22
<!-- Import the default build targets and helpers. -->
33
<Import Project="common\build.shared.proj" />
4-
4+
55
<!-- Add custom targets and overrides here -->
66

77
</Project>

build/common/common.ps1

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Function Install-DotnetCLI {
2424

2525
& $installDotnet -Channel 6.0 -i $CLIRoot
2626
& $installDotnet -Channel 8.0 -i $CLIRoot
27+
& $installDotnet -Channel 9.0 -i $CLIRoot
2728

2829
if (-not (Test-Path $DotnetExe)) {
2930
Write-Log "Missing $DotnetExe"
@@ -72,7 +73,7 @@ Function Install-NuGetExe {
7273
$nugetDir = Split-Path $nugetExe
7374
New-Item -ItemType Directory -Force -Path $nugetDir
7475

75-
Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/v6.9.1/nuget.exe -OutFile $nugetExe
76+
Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/v6.12.1/nuget.exe -OutFile $nugetExe
7677
}
7778
}
7879

@@ -126,53 +127,11 @@ Function Invoke-DotnetMSBuild {
126127
Invoke-DotnetExe $RepoRoot $buildArgs
127128
}
128129

129-
Function Install-DotnetTools {
130-
param(
131-
[string]$RepoRoot
132-
)
133-
134-
$toolsPath = Join-Path $RepoRoot ".nuget/tools"
135-
136-
if (-not (Test-Path $toolsPath)) {
137-
Write-Host "Installing dotnet tools to $toolsPath"
138-
$args = @("tool","install","--tool-path",$toolsPath,"--ignore-failed-sources","dotnet-format","--version","5.1.250801")
139-
140-
Invoke-DotnetExe $RepoRoot $args
141-
}
142-
}
143-
144130
Function Install-CommonBuildTools {
145131
param(
146132
[string]$RepoRoot
147133
)
148134

149135
Install-DotnetCLI $RepoRoot
150136
Install-NuGetExe $RepoRoot
151-
Install-DotnetTools $RepoRoot
152-
}
153-
154-
Function Invoke-DotnetFormat {
155-
param(
156-
[string]$RepoRoot
157-
)
158-
159-
# Only run in local dev envs
160-
if ($env:CI -ne "True")
161-
{
162-
$formatExe = Join-Path $RepoRoot ".nuget/tools/dotnet-format.exe"
163-
164-
$args = @("--fix-whitespace", "--fix-style", "warn")
165-
166-
$command = "$formatExe $args"
167-
Write-Host "[EXEC] $command" -ForegroundColor Cyan
168-
169-
& $formatExe $args
170-
171-
if (-not $?) {
172-
Write-Warning "dotnet-format failed. Please fix the style errors!"
173-
174-
# Currently dotnet-format fails on CIs but not locally in some scenarios
175-
# exit 1
176-
}
177-
}
178137
}

build/common/common.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ run_standard_tests()
77
# Download dotnet cli
88
REPO_ROOT=$(pwd)
99
DOTNET=$(pwd)/.cli/dotnet
10-
DOTNET_TOOLS=$(pwd)/.nuget/tools
11-
DOTNET_FORMAT=$DOTNET_TOOLS/dotnet-format
1210

1311
if [ ! -f $DOTNET ]; then
1412
echo "Installing dotnet"
@@ -19,21 +17,12 @@ run_standard_tests()
1917
chmod +x .cli/dotnet-install.sh
2018
.cli/dotnet-install.sh -i .cli --channel 6.0
2119
.cli/dotnet-install.sh -i .cli --channel 8.0
20+
.cli/dotnet-install.sh -i .cli --channel 9.0
2221
fi
2322

2423
# Display info
2524
$DOTNET --info
2625

27-
# install dotnet-format
28-
if [ ! -d $DOTNET_TOOLS ]; then
29-
echo "Installing dotnet tools"
30-
mkdir -p .nuget/tools
31-
32-
$DOTNET tool install --tool-path $DOTNET_TOOLS --ignore-failed-sources dotnet-format --version 5.1.250801
33-
fi
34-
35-
$DOTNET_FORMAT --fix-whitespace --fix-style warn
36-
3726
# clean
3827
rm -r -f $(pwd)/artifacts
3928

build/common/common.targets

Lines changed: 3 additions & 3 deletions
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')) OR $(TargetFramework.Contains('net8'))">
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')) OR $(TargetFramework.Contains('net9'))">
2727
<PropertyGroup>
2828
<DefineConstants>$(DefineConstants);IS_CORECLR</DefineConstants>
2929
<IsCore>true</IsCore>
@@ -69,7 +69,7 @@
6969
<PropertyGroup Condition=" '$(PackProject)' == 'true' ">
7070
<IsPackable>true</IsPackable>
7171
<IncludeSymbols Condition=" '$(IncludeSymbols)' == '' AND '$(DebugType)' != 'embedded' ">true</IncludeSymbols>
72-
<SymbolPackageFormat Condition=" '$(IncludeSymbols)' == '' AND '$(DebugType)' != 'embedded' ">snupkg</SymbolPackageFormat>
72+
<SymbolPackageFormat Condition=" '$(IncludeSymbols)' == '' AND '$(DebugType)' != 'embedded' ">snupkg</SymbolPackageFormat>
7373
<PackageOutputPath>$(NupkgOutputDirectory)</PackageOutputPath>
7474
<NoPackageAnalysis>true</NoPackageAnalysis>
7575
</PropertyGroup>
@@ -255,7 +255,7 @@
255255
<ToolEntryPoint Condition=" '$(ToolEntryPoint)' == '' ">$(AssemblyName).dll</ToolEntryPoint>
256256
<ToolOutputPath>$(PublishOutputDirectory)$(TargetFramework)\DotnetToolSettings.xml</ToolOutputPath>
257257
</PropertyGroup>
258-
258+
259259
<!-- Run publish -->
260260
<MSBuild Projects="$(MSBuildProjectFullPath)"
261261
Targets="WriteToolSettingsFile"

build/config.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project ToolsVersion="15.0">
22
<!-- Dependency versions -->
33
<PropertyGroup>
4-
<NuGetPackageVersion>6.9.1</NuGetPackageVersion>
5-
<NuGetTestHelpersVersion>2.1.26</NuGetTestHelpersVersion>
4+
<NuGetPackageVersion>6.12.1</NuGetPackageVersion>
5+
<NuGetTestHelpersVersion>2.1.38</NuGetTestHelpersVersion>
66
<CommandLineUtilsVersion>2.0.0</CommandLineUtilsVersion>
77
<FileSystemGlobbingVersion>2.0.0</FileSystemGlobbingVersion>
88
</PropertyGroup>
9-
9+
1010
<!-- Config -->
1111
<PropertyGroup>
1212
<RepositoryName>NupkgWrench</RepositoryName>

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;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
77
</PropertyGroup>
88

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

test/NupkgWrench.Tests/NupkgWrench.Tests.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;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
77
</PropertyGroup>
88

99
<ItemGroup>

test/Test.Common/Test.Common.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
1717
</ItemGroup>
1818

19+
<ItemGroup>
20+
<!-- Vuln fixes -->
21+
<PackageReference Include="System.Net.Http" Version="4.3.4" />
22+
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
23+
</ItemGroup>
24+
1925
<Import Project="$(BuildCommonDirectory)\common.targets" />
2026
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
2127
</Project>

0 commit comments

Comments
 (0)