asv-soft / asv-drones

Open source implementation of ground control station application for ArduPilot and PX4 autopilot
MIT License
91 stars 14 forks source link

Build fail on Linux, The current .NET SDK does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. #339

Closed tribbloid closed 2 months ago

tribbloid commented 2 months ago
  1. Description: A brief description of the error or issue you have encountered.

cannot build on Linux, log shows targeting .NET 8.0.but all toolchain pointing to .NET 7.0

  1. Steps to Reproduce: build with instruction in README.md ...

  2. Expected Result: Describe what you expected to see after performing the steps mentioned above.

build success

  1. Actual Result: Describe what actually happened after performing the steps mentioned above.
peng@pop-os:/home/repair/git/asv-drones/src/Asv.Drones.Gui.Desktop$ dotnet workload restore
Installing workloads: 

Skipping NuGet package signature verification.
Installing workload manifest microsoft.net.sdk.android version 33.0.95…
Installing workload manifest microsoft.net.sdk.ios version 16.4.7142…
Installing workload manifest microsoft.net.sdk.maccatalyst version 16.4.7142…
Installing workload manifest microsoft.net.sdk.macos version 13.3.7142…
Installing workload manifest microsoft.net.sdk.maui version 7.0.101…
Installing workload manifest microsoft.net.sdk.tvos version 16.4.7142…
Installing workload manifest microsoft.net.workload.mono.toolchain.net6 version 7.0.20…
Installing workload manifest microsoft.net.workload.mono.toolchain.net7 version 7.0.20…
Installing workload manifest microsoft.net.workload.emscripten.net6 version 7.0.20…
Installing workload manifest microsoft.net.workload.emscripten.net7 version 7.0.20…
Garbage collecting for SDK feature band(s) 8.0.300...

Successfully installed workload(s) .

peng@pop-os:/home/repair/git/asv-drones/src/Asv.Drones.Gui.Desktop$ dotnet workload repair

No workloads are installed, nothing to repair. Run `dotnet workload search` to find workloads to install.
peng@pop-os:/home/repair/git/asv-drones/src/Asv.Drones.Gui.Desktop$ dotnet build
MSBuild version 17.4.8+6918b863a for .NET
  Determining projects to restore...
/usr/lib/dotnet/sdk/7.0.119/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/home/repair/git/asv-drones/src/Asv.Drones.Gui/Asv.Drones.Gui.csproj]
/usr/lib/dotnet/sdk/7.0.119/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/home/repair/git/asv-drones/src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj]
/usr/lib/dotnet/sdk/7.0.119/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/home/repair/git/asv-drones/src/Asv.Drones.Gui.Desktop/Asv.Drones.Gui.Desktop.csproj]

Build FAILED.

/usr/lib/dotnet/sdk/7.0.119/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/home/repair/git/asv-drones/src/Asv.Drones.Gui/Asv.Drones.Gui.csproj]
/usr/lib/dotnet/sdk/7.0.119/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/home/repair/git/asv-drones/src/Asv.Drones.Gui.Api/Asv.Drones.Gui.Api.csproj]
/usr/lib/dotnet/sdk/7.0.119/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 8.0.  Either target .NET 7.0 or lower, or use a version of the .NET SDK that supports .NET 8.0. [/home/repair/git/asv-drones/src/Asv.Drones.Gui.Desktop/Asv.Drones.Gui.Desktop.csproj]
    0 Warning(s)
    3 Error(s)

Time Elapsed 00:00:00.61
peng@pop-os:/home/repair/git/asv-drones/src/Asv.Drones.Gui.Desktop$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    global.json

nothing added to commit but untracked files present (use "git add" to track)
peng@pop-os:/home/repair/git/asv-drones/src/Asv.Drones.Gui.Desktop$ cat global.json
{
  "sdk": {
    "version": "7.0.119"
  }
}
  1. Screenshots: If applicable, add screenshots to help explain your problem.

  2. Environment: Desktop: OS: Pop_OS/Ubuntu 22.04 Version: master

  3. Additional Context: N/A

tribbloid commented 2 months ago

I'm under the impression that dotnet core 7.0 is out of support from Microsoft, while 8.0 is the new LTS version, if so, should the project be migrated?

asv-soft-u01 commented 2 months ago

Hello!

Can you please provide the dotnet info from your linux install? You can do it by typing command dotnet --info in your terminal.

asv-soft-u01 commented 2 months ago

image I am currnetly on Fedora and all works fine, i have installed dotnet 8 and dotnet 6 following these instructions.

tribbloid commented 2 months ago

thanks you so much! turns out that dotnet7 is indeed obsolete, problem solved after upgrading to dotnet8 LTS.

closing it now

asv-soft-u01 commented 2 months ago

Happy to help!