Skip to content

Commit

Permalink
feat: support build for .NET 9.0 (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seddryck authored Dec 1, 2024
1 parent de4933d commit 890f5b1
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<LangVersion>12.0</LangVersion>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
<Platform>AnyCPU</Platform>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
12 changes: 9 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,18 @@ environment:

init:
- cmd: git config --global core.autocrlf true
- cmd: setx IGNORE_NORMALISATION_GIT_HEAD_MOVE "1"
- cmd: setx DOTNET_NO_WORKLOAD_UPDATE_NOTIFICATION "true"
- cmd: setx IGNORE_NORMALISATION_GIT_HEAD_MOVE 1
- cmd: setx DOTNET_NO_WORKLOAD_UPDATE_NOTIFICATION 1
- cmd: setx DOTNET_CLI_TELEMETRY_OPTOUT 1
- cmd: setx DOTNET_NOLOGO 1
- cmd: RefreshEnv.cmd
- pwsh: Write-Host "Target branch is '$($env:APPVEYOR_REPO_BRANCH)'"

install:
- ps: |
Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
& $env:temp\dotnet-install.ps1 -Architecture x64 -Version '9.0.100' -InstallDir "$env:ProgramFiles\dotnet"
before_build:
- cmd: gitversion /output buildserver /verbosity Minimal
- pwsh: Write-Host "Building Didot version $($env:GitVersion_SemVer)"
Expand All @@ -47,7 +54,6 @@ before_build:
}
build_script:
#- dotnet --info
- dotnet build Didot.sln -p:version="%GitVersion_SemVer%" -c Release /p:ContinuousIntegrationBuild=true --nologo

test_script:
Expand Down
4 changes: 2 additions & 2 deletions package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $projects = @(
"src/Didot.Core/Didot.Core.csproj",
"src/Didot.Cli/Didot.Cli.csproj"
)
$frameworks = @("net7.0", "net8.0")
$frameworks = @("net8.0", "net9.0")
$runtimes = ("win-x64", "linux-x64")

foreach ($project in $projects) {
Expand All @@ -23,4 +23,4 @@ foreach ($project in $projects) {
}
Write-Host "Packaging Nuget $project ..."
dotnet pack $project -p:version="$env:GitVersion_SemVer" -c Release --include-symbols --no-build --nologo
}
}
1 change: 1 addition & 0 deletions src/Didot.Cli/Didot.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/Didot.Core/Didot.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -17,5 +17,8 @@
<PackageReference Include="SmartFormat.NET" Version="3.5.1" />
<PackageReference Include="YamlDotNet" Version="16.2.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions testing/Didot.Cli.Testing/Didot.Cli.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="1.2.25">
Expand Down
1 change: 1 addition & 0 deletions testing/Didot.Core.Testing/Didot.Core.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="DotNet.ReproducibleBuilds" Version="1.2.25">
Expand Down

0 comments on commit 890f5b1

Please sign in to comment.