Skip to content

Commit

Permalink
Changes for dotnet 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Feb 17, 2025
1 parent 7e5a1f8 commit ac58f89
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,13 @@ In any case, you can stop all cache sessions with `gsudo -k`.

When I created `gsudo`, there were other `sudo` packages on most Windows popular package managers such as `Chocolatey` and `Scoop`, so I had no other choice to pick another name. `gsudo` installers create an alias for `sudo`, so feel free to use `sudo` on your command line to invoke `gsudo`.

- Why did you migrated from `.Net Framework 4.6` to `.Net 8.0`?
- Which dotnet version is built with?

Starting from v1.4.0, it is built using NativeAOT. It loads faster and uses less memory, and runs on machines without any .Net runtime installed. Prior versions `<= v1.3.0` used .Net 4.6, because it was included in every Windows 10/11 installation.
Versions prior to v1.3.0 used .NET 4.6 because it was included in every Windows 10/11 installation.

From v1.4.0 up to v2.5.1, gsudo has been built using .net7.0 NativeAOT. This approach offers faster load times, reduced memory usage, and allows the tool to run on machines without any .NET runtime installed.

Starting with v2.6.0, we've migrated to net9.0 due to the end-of-life of net7.0.

- Is `gsudo` a port of `*nix sudo`?

Expand Down
2 changes: 1 addition & 1 deletion build/00-prerequisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ choco install il-repack
choco install GitVersion.Portable
choco install wixtoolset
choco install hub
choco install dotnet-8.0-sdk
choco install dotnet-9.0-sdk
choco install NuGet.CommandLine
8 changes: 4 additions & 4 deletions build/01-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ if ($env:version) {
"-- Cleaning bin & obj folders"
Get-Item ".\src\gsudo\bin\", ".\src\gsudo\obj\" -ErrorAction Ignore | Remove-Item -Recurse -Force
"-- Building net9.0 win-arm64"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\arm64 -f net9.0 -r win-arm64 --sc -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\arm64 -f net9.0 -r win-arm64 || $(exit $LASTEXITCODE)
"-- Building net9.0 win-x64"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x64 -f net9.0 -r win-x64 --sc -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x64 -f net9.0 -r win-x64 || $(exit $LASTEXITCODE)
"-- Building net9.0 win-x86"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x86 -f net9.0 -r win-x86 --sc -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x86 -f net9.0 -r win-x86 || $(exit $LASTEXITCODE)
"-- Building net4.6 AnyCpu"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\net46-AnyCpu\unmerged -f net46 -p:Platform=AnyCpu -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\net46-AnyCpu\unmerged -f net46 -p:Platform=AnyCpu -p:WarningLevel=0 || $(exit $LASTEXITCODE)

"-- Repacking net4.6 AnyCpu into a single EXE"

Expand Down

0 comments on commit ac58f89

Please sign in to comment.