AvaloniaUI / Avalonia.Labs

Experimental Controls for Avalonia
MIT License
202 stars 30 forks source link

Cannot run the samples on Linux because of workload dependencies #91

Open timothyparez opened 2 days ago

timothyparez commented 2 days ago

If you clone this repository and try to run it on Linux it will fail because the android and macos workloads are not available:

/usr/lib/dotnet/sdk/8.0.110/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(117,5): error NETSDK1139: The target platform identifier android was not recognized. [...../Projects/Avalonia.Labs/src/Avalonia.Labs.Notifications/Avalonia.Labs.Notifications.csproj::TargetFramework=net8.0-android]
/usr/lib/dotnet/sdk/8.0.110/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(117,5): error NETSDK1139: The target platform identifier macos was not recognized. [.../Projects/Avalonia.Labs/samples/Avalonia.Labs.Catalog.Desktop/Avalonia.Labs.Catalog.Desktop.csproj::TargetFramework=net8.0-macos]
emmauss commented 2 days ago

Install the dotnet android and macos workloads

timothyparez commented 2 days ago

That doesn't work on Linux/Ubuntu

dotnet workload install android
Workload ID android is not recognized
dotnet workload install maui-android
Workload ID maui-android is not recognized

Other workloads like wasm-tools etc are supported. It doesn't seem like Microsoft ever had the intention of making Xamarin/Maui stuff work on Linux. (Which is one of the reasons we use Avalonia instead of MAUI)

emmauss commented 2 days ago

Did you install dotnet using the official install scripts from the dotnet site, or using "apt". Using the install scripts is recommended.

timothyparez commented 2 days ago

I probably installed via apt. I will try the install scripts on a different machine.

maxkatz6 commented 2 days ago

All standard workloads, except iOS, should be buildable on Linux.