Zenn
Open99

[WIP] .NET MAUI で Linux 向けにビルドしたい!

Lemon73Lemon73

.NET MAUI とは

.NET MAUI は C# と XAML により GUI クロスプラットフォームアプリケーションを開発できるフレームワークです。

Linux 版

しかし、登場した当時は Linux 版はコミュニティーによる開発扱いで、現在はもはや Linux の存在は公式ドキュメントから削除されています。

現在のコミュニティーによる開発は、ほとんど停滞しており、その開発の情報はほとんど存在しません。

この資料の目的

この資料は .NET MAUI を Linux でなんとか利用できないか試み、情報をある程度まとめたものです。

Lemon73Lemon73

参考になるページ

リポジトリ

下2つは、#66などで maui-linux にマージしています。このリポジトリの保持者である jsuarezruiz さんも今はあんまり MAUI Linux の開発に関与していないようです。

コミュニティー

本家の wiki でも強い要望があるにも関わらず、MS やコミュニティーによる開発はあまり進んでいません。(というか、興味がある人は多いけど、開発資料が少なすぎて途中参入が難しいんだとおもう)

(まじで情報がない)

Lemon73Lemon73

ビルドとかの方針

これは指針であり、まだ成功はしていません。

A 案

Windows や macOS 上でのビルドと同様に行う (多分無理)

-> Linux 上では maui-android 以外使えないので、ビルドエラーが大量に出る

B 案

CI/CD を参考にする

-> gtk のワークロードがインストールできない

C 案

CI/CD をそのまま動かす (一番希望がある)

-> GitHub Actions をローカルで動かせる act でできるかも (現状若干エラーが出てるけど頑張れば行けるか?)
-> B 案と同じで、gtk のワークロードのインストールができない

D 案

自作する (無理)

-> Qt (Qt.NET (古い)) で作るとか (ライセンス的 (GPL/LGPL) に微妙な気がする)

結論

とりあえず C 案で進めます。B 案でもほぼ同じな気がしますが… (資料作るときは B 案のほうが act とか入れなくてもいいので、簡単になりそう)

Lemon73Lemon73

雑に URL を貼る

CI/CD はバージョンがかなり古いので、すべて v4 に上げるのを推奨するよ

Lemon73Lemon73

ぶっちゃけ、あと gtkのワークロードさえインストールできれば動きそうな雰囲気ある

あと、多分これ (GTK ランタイム) は必要かも

sudo apt install libgtk-3-dev
sudo apt install libgtk-3-0
Lemon73Lemon73

一応 act の使い方をちょっと書いておく

  1. gh (GitHub CLI) をインストール
# 参考: https://github.com/cli/cli/blob/trunk/docs/install_linux.md
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
	&& sudo mkdir -p -m 755 /etc/apt/keyrings \
	&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
	&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
	&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
	&& sudo apt update \
	&& sudo apt install gh -y
  1. act をインストール
# 参考: https://nektosact.com/installation/gh.html
gh extension install https://github.com/nektos/gh-act
  1. Docker をインストール (よくわからないけど apt で全部入れた (?) 多分 docker.io があればいいのかな?)
  2. Docker 起動
sudo systemctl start docker
  1. ユーザーを docker グループに追加 (docker はスーパーユーザーが必要)
sudo usermod -aG docker $USER
newgrp docker # 変更を適応
  1. リポジトリをクローンして、その中に移動する
git clone <リポジトリの URL>
cd <クローンしたディレクトリ>
  1. 動かす
# 場所は、リポジトリのルートで実行 (ルートじゃなくても動くかも?)
gh act push
# または gh act pull_request かな?
Lemon73Lemon73
# 参考: https://github.com/HavenDV/Gtk
curl -sSL https://raw.githubusercontent.com/HavenDV/Gtk/main/scripts/workload-install.sh | sudo bash

これやって、0.2.0はありません的なエラーが出たから、他の方法を試した。
(インストールできてないから dotnet workload list には入らないけど、dotnet workload search には入る)

# 参考: https://matrix.to/#/!secXICyMCTWkttVBVC:matrix.org/$uX3kcJ_AITkkFvqne3wkFJUL4_77o_FpfpGos6RphzI?via=matrix.org
git clone https://github.com/GtkSharp/GtkSharp.git
cd GtkSharp
sudo dotnet tool restore
sudo dotnet cake --BuildTarget=InstallWorkload 

これやって、

# (これは元からインストールしてたっぽいから関係ない気がするけど)
sudo apt-get install libgtk-3-0

これやった後に、もう一度 sudo dotnet workload install gtk したら、なぜかインストールできた

$ dotnet workload list

インストール済みワークロードの ID      マニフェストのバージョン        インストール ソース 
-------------------------------------------------------
gtk                     0.2.0/8.0.400       SDK 8.0.400
maui-android            8.0.82/8.0.100      SDK 8.0.400
wasi-experimental       8.0.8/8.0.100       SDK 8.0.400

`dotnet workload search` を使用して追加ワークロードを検出し、インストールします。
Lemon73Lemon73

(なんか gtk が入った後も、結構苦難している)

Lemon73Lemon73

色んな方法を試しすぎてて、再現性が低くなりそう (あとでちゃんとした資料を書くつもり (これが本来の目的だし))

Lemon73Lemon73
# 参考: https://github.com/jsuarezruiz/maui-linux/issues/92#issuecomment-2311842074
dotnet cake --target=dotnet-pack --workloads=global --gtk
dotnet new install ./artifacts/*.nupkg

を試して、

# (Nuget.config)
- <!-- <add key="local" value="artifacts" /> -->
+ <add key="local" value="artifacts" />

にした。

この後にビルドをすると、Gtk あたりのエラーは解消されたっぽい。

だけど、次のエラーが発生した。

Lemon73Lemon73

System.Text.Json 8.0.0 が致命的な脆弱性があるというエラーが発生するので、バージョンを上げる。

eng/Versions.props
# $(MicrosoftNETCoreAppRefPackageVersion) は8.0.0になってる
- <SystemTextJsonPackageVersion>$(MicrosoftNETCoreAppRefPackageVersion)</SystemTextJsonPackageVersion>
+ <SystemTextJsonPackageVersion>8.0.4</SystemTextJsonPackageVersion>

ついでに、ビルドターゲットの出力形式を変更する

Maui.Controls.Sample.csproj
- <!-- <OutputType Condition="$(TargetFramework.Contains('-'))">Exe</OutputType> -->
+ <OutputType>Exe</OutputType>
Lemon73Lemon73

規定に関しても設定しなきゃいけないらしい

launchSettings.json
{
  "profiles": {
    "Windows Machine": {
      "commandName": "MsixPackage",
      "nativeDebugging": true
+   },
+   "Linux Machne": {
+     "commandName": "Project",
+     "nativeDebugging": true
    }
  }
}

あと、Main() が必要らしい (Windows とかは /Platforms/Windows/App.xaml.cs とかを参照にしてるっぽい)

MauiProgram.cs
public static void Main()
{
  CreateMauiApp();
}
Lemon73Lemon73
dotnet run --project src/Controls/samples/Controls.Sample/Maui.Controls.Sample.csproj --framework net8.0

まだエラーは続く…

Unhandled exception. Microsoft.Maui.ApplicationModel.NotImplementedInReferenceAssemblyException: This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.
   at Microsoft.Maui.ApplicationModel.AppInfoImplementation.get_PackagingModel() in /home/lemon73/Downloads/maui-linux/src/Essentials/src/AppInfo/AppInfo.netstandard.cs:line 19
   at Microsoft.Maui.ApplicationModel.AppInfo.get_PackagingModel() in /home/lemon73/Downloads/maui-linux/src/Essentials/src/AppInfo/AppInfo.shared.cs:line 106
   at Maui.Controls.Sample.MauiProgram.<>c.<CreateMauiApp>b__4_3(IEssentialsBuilder essentials) in /home/lemon73/Downloads/maui-linux/src/Controls/samples/Controls.Sample/MauiProgram.cs:line 191
   at Microsoft.Maui.Hosting.EssentialsExtensions.EssentialsRegistration.RegisterEssentialsOptions(IEssentialsBuilder essentials) in /home/lemon73/Downloads/maui-linux/src/Core/src/Hosting/EssentialsMauiAppBuilderExtensions.cs:line 110
   at Microsoft.Maui.Hosting.EssentialsExtensions.EssentialsInitializer.Initialize(IServiceProvider services) in /home/lemon73/Downloads/maui-linux/src/Core/src/Hosting/EssentialsMauiAppBuilderExtensions.cs:line 131
   at Microsoft.Maui.MauiContextExtensions.InitializeAppServices(MauiApp mauiApp) in /home/lemon73/Downloads/maui-linux/src/Core/src/MauiContextExtensions.cs:line 84
   at Microsoft.Maui.Hosting.MauiAppBuilder.Build() in /home/lemon73/Downloads/maui-linux/src/Core/src/Hosting/MauiAppBuilder.cs:line 159
   at Maui.Controls.Sample.MauiProgram.CreateMauiApp() in /home/lemon73/Downloads/maui-linux/src/Controls/samples/Controls.Sample/MauiProgram.cs:line 304
   at Maui.Controls.Sample.MauiProgram.Main() in /home/lemon73/Downloads/maui-linux/src/Controls/samples/Controls.Sample/MauiProgram.cs:line 48

Essentials でエラーが発生してるっぽいけど…なにこれ…

Lemon73Lemon73

よくわからないので、一旦 Microsoft.Maui-vscode.sln のビルドを目指すことに。

Lemon73Lemon73
$ dotnet run --project  Microsoft.Maui-vscode.sln 
# (エラー文)
/usr/share/dotnet/sdk/8.0.401/NuGet.targets(174,5): error : 無効なフレームワーク識別子 ''。 [/home/lemon73/Downloads/maui-linux/Microsoft.Maui-vscode.sln]

ビルドに失敗しました。ビルド エラーを修正して、もう一度実行してください。
Lemon73Lemon73

global.json

{
  "sdk": {
    "version": "8.0.401"
  }
}

を追加するも、特に効果はなし。

Lemon73Lemon73

調節したら、別のエラーになった…
結局よくわからない

困難を極める

Lemon73Lemon73

ついに動きました。詳しくは後で書きます。

おそらく、src/Controls/samples/Controls.Sample.Gtk/Controls.Sample.Gtk.csproj は動くので、

dotnet run --project src/Controls/samples/Controls.Sample.Gtk/Controls.Sample.Gtk.csproj --framework net8.0-gtk にします。

(画像の調整の必要あり (後で書く予定))

でも、UI が崩壊しているね… (おそらく仕様)

Lemon73Lemon73

UI が崩壊しているのは、自分の Linux (KDE neon) 内で規定している GTK のテーマカラーが影響しているんじゃないかと思い、テーマカラーを上書きする設定にしたら、予想通り直った。

GTK_THEME=Adwaita:light dotnet run --project src/Controls/samples/Controls.Sample.Gtk/Controls.Sample.Gtk.csproj --framework net8.0-gtk

(GTK_THEME=Adwaita:light を追加)

これで、一通り開発できるわね。既存のアプリケーションへの適応はできなさそうだけど、あとで試してみるかも。(Essential あたりがほぼ実装されてない気がする)

Lemon73Lemon73

xaml での記述は無理かも?だけど、C# ではなんとか記述できるかも

とりあえず、コードの簡略化を進めますよん

Lemon73Lemon73

現状 Mali で作業しているけど、maui-linux のほうが新しいデータが入ってていいかも

Lemon73Lemon73

なんか、maui-linux でビルドしようとすると Graphics とか Essential でエラーが出るねぇ
あと、ios のワークロードが必要的な (Visual Studio なら動かせる?)

やっぱり Mali で動かすことにしよう。(ちょっと古いけど)

Lemon73Lemon73

とりあえず Nuget (追記: 一時的なアップロードだし、GitHub Packages のほうがいいか) にあげてみようかな。ライセンス (MIT License) 的には大丈夫だし。

Lemon73Lemon73

というか GitHub で現在の状況を公開したほうがいいか…?
面倒だからやってないけど

Lemon73Lemon73

とりあえず Nuget (追記: 一時的なアップロードだし、GitHub Packages のほうがいいか) にあげてみようかな。ライセンス (MIT License) 的には大丈夫だし。

ということで、とりあえず Core, Controls.Core, Compatibility の3つを以下のように編集しました。

.csproj
  <PropertyGroup>
    ...
-   <IsPackable>false</IsPackable>
+   <!-- <IsPackable>false</IsPackable> -->
    ...
+   <PackageId>Lemon73.Microsoft.Maui.Controls</PackageId>
+   <Version>0.0.1</Version>
+   <Authors>Lemon73 and others</Authors>
+   <Company>Lemon's Resting Area and others</Company>
  </PropertyGroup>

で Nuget 形式にパックする

dotnet pack src/Compatibility/Core/src/Compatibility.csproj
dotnet pack src/Core/src/Core.csproj
dotnet pack src/Controls/src/Core/Controls.Core.csproj

それを GitHub Packages で頒布

dotnet nuget push "artifacts/*.nupkg" --api-key (API キー) --source "github" --skip-duplicate

で頒布したのが以下のもの (あとで消すと思います。なので将来的にリンク切れするかも)

(なぜかバージョン指定がうまく行っていない気がする)


参考

Lemon73Lemon73

あとで、実際に利用できるか試してみます。

(なぜかバージョン指定がうまく行っていない気がする)

あと、なぜか .net6 になってるので、.net8 でビルドしたい

Lemon73Lemon73

あとで、実際に利用できるか試してみます。

依存関係的にこの3つだけでは動かないっぽい (もしかしたら全部ビルドする必要あるかも)

あと、なぜか .net6 になってるので、.net8 でビルドしたい

これは eng/Version.props を変えれば良さそう (-dev がついているのはよくわからない)

Lemon73Lemon73

やっぱり、Mali は基本的に .net6 ベースだから、.net8 ベースの maui-linux を動かしたいな

Lemon73Lemon73

とりあえず Nuget (追記: 一時的なアップロードだし、GitHub Packages のほうがいいか) にあげてみようかな。

やっぱり、Mali は基本的に .net6 ベースだから、.net8 ベースの maui-linux を動かしたいな

Related: https://github.com/jsuarezruiz/maui-linux/issues/94

この Issue の完了に目標を変更しよう

Lemon73Lemon73

とりあえず Nuget (追記: 一時的なアップロードだし、GitHub Packages のほうがいいか) にあげてみようかな。

やっぱり、Mali は基本的に .net6 ベースだから、.net8 ベースの maui-linux を動かしたいな

Related: https://github.com/jsuarezruiz/maui-linux/issues/94

この Issue の完了に目標を変更しよう

https://github.com/jsuarezruiz/maui-linux/blob/main-linux/eng/pipelines/common/pack.yml これ (Azure Devops 向け) を GitHub Actions 用に調節すれば Pack 部分ができる。あとは、我らが Alice Console (謎の自作構文) の https://github.com/AliceNovel/AliceConsole/blob/main/.github/workflows/nuget.yml を参考にして、Nuget.org にコミットごと+タグごとにリリースさせればいい。

Lemon73Lemon73

現状 Mali で作業しているけど、maui-linux のほうが新しいデータが入ってていいかも

というか GitHub で現在の状況を公開したほうがいいか…?
面倒だからやってないけど

とりあえず Nuget (追記: 一時的なアップロードだし、GitHub Packages のほうがいいか) にあげてみようかな。

やっぱり、Mali は基本的に .net6 ベースだから、.net8 ベースの maui-linux を動かしたいな

Related: https://github.com/jsuarezruiz/maui-linux/issues/94

この Issue の完了に目標を変更しよう

https://github.com/jsuarezruiz/maui-linux/blob/main-linux/eng/pipelines/common/pack.yml これ (Azure Devops 向け) を GitHub Actions 用に調節すれば Pack 部分ができる。あとは、我らが Alice Console (謎の自作構文) の https://github.com/AliceNovel/AliceConsole/blob/main/.github/workflows/nuget.yml を参考にして、Nuget.org にコミットごと+タグごとにリリースさせればいい。

ってことで、maui-linux (Lemon73 Fork) ですわ。

Lemon73Lemon73

やっぱこれか?

https://matrix.to/#/!secXICyMCTWkttVBVC:matrix.org/$uX3kcJ_AITkkFvqne3wkFJUL4_77o_FpfpGos6RphzI?via=matrix.org

# install dotnet 6
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-6.0

# add keys
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

# install gtksharp with dotnet 6 support
git clone https://github.com/trungnt2910/GtkSharp.git
cd GtkSharp
sudo dotnet tool restore
sudo dotnet cake --BuildTarget=InstallWorkload 

# temporary hack for making the templates visible in dotnet new
sudo cp /usr/share/dotnet/template-packs/* /usr/share/dotnet/templates/6.0.5

# install gtk
sudo apt-get install libgtk-3-0

# test gtk template
cd ..
mkdir gtksharptest
cd gtksharptest
dotnet new gtk
dotnet run
Lemon73Lemon73

これを GitHub Actions 上で試してみるか。

git clone https://github.com/trungnt2910/GtkSharp.git
dotnet cake --BuildTarget=InstallWorkload

PowerShell 上で動いているっぽいので。

だめだー

Lemon73Lemon73

実機で動かしてみた感じ

  1. https://github.com/jsuarezruiz/maui-linux/blob/main/.github/workflows/build-gtk.yml (Linux 向けを Windows 向けに調整して動かす) -> だめ
  2. https://github.com/GtkSharp/GtkSharp/blob/develop/.github/workflows/main.yml (ビルドして動かす) -> だめ
  3. https://www.nuget.org/packages/Gtk.Sdk (スクリプト) -> だめ
  4. https://github.com/GtkSharp/GtkSharp/wiki/Installing-Gtk-on-Windows (msys2 使う) -> 未検証
  5. (https://www.nuget.org/packages/Gtk4DotNet -> Linux 専用?)

つまり、今までやっていたことは、CI/CD だからエラーになっているというわけではなく、実機でもだめっぽい。

可能なら、GitHub Actions の Windows 上で WSL を動かしたい。それなら Linux のコマンドが使えるから、1の方法ができるはず。(とはいえ、インストールに時間がかかって、CI/CD がかなり遅くなりそうだから非推奨かな…)

Lemon73Lemon73

可能なら、GitHub Actions の Windows 上で WSL を動かしたい。それなら Linux のコマンドが使えるから、1の方法ができるはず。(とはいえ、インストールに時間がかかって、CI/CD がかなり遅くなりそうだから非推奨かな…)

https://github.com/marketplace/actions/setup-wsl

あるじゃん!!

明日試してみる。WSL でも無理そうなら素直に MSYS2 頑張るか

Lemon73Lemon73

WSL 厳しそう。msys2 を実機でやって、ci にするか

Lemon73Lemon73

どうせ無理だと思うけど、gtk なしで一旦ビルドできるか試してみる?

最終目的はビルドして .nupkg を nuget.org に上げることなので、その過程については特にこだわりはないし

Lemon73Lemon73

何故かパスが通せない。から、逆に dotnet をコピーするか...?

でも、さすがに速度が遅くなりそう

Lemon73Lemon73

ちなみに、MAUI の開発で必須な Microsoft.Maui.ControlsMicrosoft.Maui.Controls.Compatibility の依存関係は以下

Lemon73Lemon73

どうやら Windows でもすべてのターゲット向けのコンパイルは厳しいらしい

https://github.com/jsuarezruiz/maui-linux/blob/c005e3aff8cf64c792f54f7b06b1f9e4ee310f78/.github/DEVELOPMENT.md#available-solutions

(.NET MAUI、クロスコンパイルが弱すぎる)

=> Linux でのビルドに切り替えてみる?

あと、dotnet build ./Microsoft.Maui.BuildTasks.slnf が必要かもしれない。

https://github.com/dotnet/maui/blob/ad6f752f70ce97846fc3e0e4becd0815153fcb1f/.github/DEVELOPMENT.md#building-the-build-tasks

Lemon73Lemon73

あとで、実際に利用できるか試してみます。

依存関係的にこの3つだけでは動かないっぽい (もしかしたら全部ビルドする必要あるかも)

あと、なぜか .net6 になってるので、.net8 でビルドしたい

これは eng/Version.props を変えれば良さそう (-dev がついているのはよくわからない)

-devDirectory.Build.props 内の <PackageVersion> で規定されているからっぽい。

(今の作業とは特に関係ないけど)

Lemon73Lemon73

現在のエラー:

/usr/share/dotnet/sdk/8.0.200/Sdks/NuGet.Build.Tasks.Pack/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(110,5):
error MSB4018:
System.ArgumentException:
PackageVersion string specified '8.0.40-ci.net8.+sha.59194fc-azdo.' is invalid.
[/home/runner/work/maui-linux/maui-linux/src/Compatibility/Core/src/Compatibility.csproj]

8.0.40-ci.net8 に関しては GitInfo.txt に記載がある。が、これがどこで利用されているのかがよくわからない。

Lemon73Lemon73

現在のエラー:

/usr/share/dotnet/sdk/8.0.200/Sdks/NuGet.Build.Tasks.Pack/buildCrossTargeting/NuGet.Build.Tasks.Pack.targets(110,5):
error MSB4018:
System.ArgumentException:
PackageVersion string specified '8.0.40-ci.net8.+sha.59194fc-azdo.' is invalid.
[/home/runner/work/maui-linux/maui-linux/src/Compatibility/Core/src/Compatibility.csproj]

見つけた

https://github.com/Lemon73-Computing/maui-linux/blob/c005e3aff8cf64c792f54f7b06b1f9e4ee310f78/eng/Versions.targets#L67-L68

$(BUILD_BUILDID) が指定されていないため文字が挿入されず、バージョンの末尾が azdo. のように . で終わってエラーになっている。

Lemon73Lemon73

あとは、maui-linux チームと連絡して調整ってかんじかな。

そういえば nuget package がちゃんと動くかわからないので、後で検証するか (github actions の artifacts にでも入れようかな?)

Lemon73Lemon73

kztao 氏の CI が洗練されているので、それを upstream に merge してもらうといいかも

kztao さんの内容を cherry pick して、自分の変更と合流させた。(これのせいで若干 commit が分かりづらい気がする…)

とりあえず PR: https://github.com/kztao/maui-linux/pull/1

文章とかがめちゃくちゃだけど、ご愛嬌…

返答をお待ちいたしますわ。多分 kztao さんも CI/CD が正常に動いていなくて困っていると思うから、情報共有したいのです。

Lemon73Lemon73

ということで、

@kztao さんからの PR (Nuget.org に、ベータ版の Packages をアップロードする CI/CD の追加)
https://github.com/jsuarezruiz/maui-linux/pull/95

@lemon73 (私) による PR (バージョンアップ)
https://github.com/jsuarezruiz/maui-linux/pull/96
(.NET 9 は STS なので、今回はバージョンアップしない。したほうがいい?[1])

が提出されましたわ。

Review を待ちます

脚注
  1. .NET 7 (STS) のときはバージョンアップされていたような気がする… ↩︎

Lemon73Lemon73

@lemon73 (私) による PR (バージョンアップ)

Review を待ちます

リポジトリの保持者に Review (Approve) されたのに Merge されない謎

Lemon73Lemon73

@kztao さんからの PR (Nuget.org に、ベータ版の Packages をアップロードする CI/CD の追加)

何故か Close する @kztao 氏

Lemon73Lemon73

@kztao さんからの PR (Nuget.org に、ベータ版の Packages をアップロードする CI/CD の追加)

何故か Close する @kztao 氏

再 Open してくれた。

@knocte 氏が担当していると思って Close したっぽい

(なお、Review と Merge してくれない @jsuarezruiz 氏 (maui-linux のリポジトリ管理者))

Lemon73Lemon73

実のところを言うと、ここ数日、maui-linux の開発が再燃しているっぽい (本流 (maui-linux) へのコミットや PR は殆どないが、Mali などの Fork にて)

GitHub 上

  1. @Lemon73 (私) が #94 (プレリリース・リリースを GitHub Actions を使って Nuget.org にリリースする) を対応しようとする
  2. なんか @kztao 氏がいい感じに途中までできているのを見つけ、上流 (maui-linux) に PR を作成してもらう
  3. (同時に @Lemon73 も Dependencies のバージョンアップの PR を作成する)
  4. @webwarrior-ws 氏による Mali への怒涛の PR が始まる (#28, #29, #31, #32)
    (ちなみに、ここは結構ややこしいのですが、@webwarrior-ws 氏のリポジトリ は @Iytico 氏の maui の Fork です。が、@knocte 氏の所持する @nblockchain (organization) の Mali に PR を作成しています。つまり下の図のような感じです)

Element (ウェブチャット) 上

  1. @Lemon73 が maui-linux を WSL2 上で動かす動画を発見し、共有する
  2. @thomiel 氏の要請により @Iytico 氏が mauil-linux の可能性についての Disscussion を開設する: https://github.com/lytico/maui/discussions/291
  3. @thomiel 氏が Docker を利用し、開発環境を簡単に整えられる作業を行う (GtkSharp, maui)

という感じ。(GitHub の4と Element の2-3はほぼ同時期 (今から1週間前くらい) です)

どう変わるか…?

Lemon73Lemon73

どう変わるか…?

何も変わりませんでした。

@jsuarezruiz 氏が Merge してくれません...

Lemon73Lemon73

@lemon73 (私) による PR (バージョンアップ)

Review を待ちます

リポジトリの保持者に Review (Approve) されたのに Merge されない謎

ということで、私の Fork は Merge されました。

CI/CD に関しては、@jsuarezruiz 氏が Nuget の Key をリポジトリに設定するの待ちって感じですね。

(@jsuarezruiz 氏の対応がやや遅めで、全体的に時間がかかってる気がする。メンテナーが1人しかいないから仕方ないけど、結構困るね)

Lemon73Lemon73

@lemon73 (私) による PR (バージョンアップ)

Review を待ちます

リポジトリの保持者に Review (Approve) されたのに Merge されない謎

ということで、私の Fork は Merge されました。

CI/CD に関しては、@jsuarezruiz 氏が Nuget の Key をリポジトリに設定するの待ちって感じですね。

(@jsuarezruiz 氏の対応がやや遅めで、全体的に時間がかかってる気がする。メンテナーが1人しかいないから仕方ないけど、結構困るね)

現状は、何待ち?状態。多分 Review 待ちだけど、うーん…

誰もコメントしていないし、年末で忙しいから取り組めていないだけかな?

Lemon73Lemon73

とりあえず、機能実装に関して検討を行います。

現状簡単そう (私の未熟な技術でもギリギリ開発できそう) なのは Clipboad の実装。

あとは、ListView とか TableViewRadioButton などは必要そう。

Map とかは優先度は低めかな

Lemon73Lemon73

https://github.com/Lemon73-Computing/maui-linux/actions/runs/12490194234/job/34854654286?pr=4

error NU1903: Warning As Error: Package 'System.Net.Http' 4.3.0 has a known high severity vulnerability, https://github.com/advisories/GHSA-7jgj-8wvc-jh57

System.Net.Http に脆弱性が見つかっており、バージョンアップする必要があるけど、どこでバージョン指定しているのかわからない…

System.Net.Http SystemNetHttp 4.3.0 で全文検索したけど、それらしいのはなさそう

Lemon73Lemon73

ちなみに、この Merge がうまく行くと、ベース (本流 .NET MAUI) バージョンが .NET MAUI (for Linux) 界隈で一番最新になる (どうでもいい)

Mali とかは未だに .NET6.0 ベースなので…

Lemon73Lemon73

System.Net.Http に脆弱性が見つかっており、バージョンアップする必要があるけど、どこでバージョン指定しているのかわからない…

System.Net.Http SystemNetHttp 4.3.0 で全文検索したけど、それらしいのはなさそう

っていうか、これは本流では変更されていないのか

Lemon73Lemon73

@lemon73 (私) による PR (バージョンアップ)

Review を待ちます

リポジトリの保持者に Review (Approve) されたのに Merge されない謎

ということで、私の Fork は Merge されました。

CI/CD に関しては、@jsuarezruiz 氏が Nuget の Key をリポジトリに設定するの待ちって感じですね。

(@jsuarezruiz 氏の対応がやや遅めで、全体的に時間がかかってる気がする。メンテナーが1人しかいないから仕方ないけど、結構困るね)

現状は、何待ち?状態。多分 Review 待ちだけど、うーん…

誰もコメントしていないし、年末で忙しいから取り組めていないだけかな?

された 🎉

https://github.com/jsuarezruiz/maui-linux/pull/99

Lemon73Lemon73

Thomas 氏が作成した Docker で作業を進めてみた。

けど、Gtk の表示エラーになるっぽい…

これが解決できれば開発できそう

いろいろ試して、1度成功したけど、再現できなかった…

どうしたら動くんだろうか

Lemon73Lemon73

WSLg のお陰で Windows11 + WSL2 では問題なく動くということはわかっているけど、Docker を使うと動かなくなってしまう。(Docker 外で動かそうとしたけど、それはやや面倒そうな)

Lemon73Lemon73

開発環境を整えること自体が難関すぎる

Lemon73Lemon73

Nix とかで自作環境作るほうがいいかな?

とりあえず、maui-linux の CI/CDDocker を参考に、Nix flake が作れないか試している。

経過段階 (workload の 'gtk' がダウンロードできていない):

{
  description = "MAUI Linux with GtkSharp and .NET 8 SDK";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs = { self, nixpkgs }: 
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
    in {
      devShells.${system}.default = pkgs.mkShell {
        name = "maui-linux-dotnet-sdk";

        buildInputs = [
          pkgs.git
          pkgs.dotnet-sdk_8
        ];

        shellHook = ''
          # Set environment variables for .NET SDK
          export GtkSharpVersion=3.24.24.117-develop
          export DotnetVersion=8.0.200
          # export DOTNET_ROOT=/usr/share/dotnet
          export DOTNET_ROOT=$(which dotnet)
          export DOTNET_DIR=/nix/store/iggzq5cbp9dxzihm2sg6jsg46044v8pr-dotnet-sdk-wrapped-8.0.407/share/dotnet
          # export WORKLOAD_MANIFEST_DIR=$DOTNET_ROOT/sdk-manifests/$DotnetVersion/gtksharp.net.sdk.gtk
          export WORKLOAD_MANIFEST_DIR=$DOTNET_DIR/sdk-manifests/8.0.100/gtksharp.net.sdk.gtk

          # Clone MAUI Linux repository
          echo "## Clone maui-linux repo ##"
          if [ ! -d "$HOME/maui-linux" ]; then
            git clone https://github.com/jsuarezruiz/maui-linux.git $HOME/maui-linux
          fi
          cd $HOME/maui-linux
          sed -i 's/_IncludeAndroid>true/_IncludeAndroid>/g' Directory.Build.Override.props

          echo "## Install Gtk Workload ##"
          dotnet nuget add source --name nuget.org "https://api.nuget.org/v3/index.json"
          wget https://www.nuget.org/api/v2/package/gtksharp.net.sdk.gtk.manifest-$DotnetVersion/$GtkSharpVersion -O gtksharp.net.sdk.gtk.manifest-$DotnetVersion.nupkg
          sudo mkdir -p $WORKLOAD_MANIFEST_DIR
          sudo apt install unzip
          sudo unzip -j gtksharp.net.sdk.gtk.manifest-$DotnetVersion.nupkg "data/*" -d $WORKLOAD_MANIFEST_DIR/
          sudo rm gtksharp.net.sdk.gtk.manifest-$DotnetVersion.nupkg
          sudo chmod 764 $WORKLOAD_MANIFEST_DIR/*
          dotnet workload search
          sudo dotnet workload install gtk --skip-manifest-update

          # dotnet build Microsoft.Maui.BuildTasks.slnf
          # dotnet build Microsoft.Maui.Gtk.slnf
        '';
      };
    };
}

Lemon73Lemon73

Nix とかで自作環境作るほうがいいかな?

とりあえず、maui-linux の CI/CD と Docker を参考に、Nix flake が作れないか試している。

とりあえず、進捗だけ

GtkSharp.Workloadhttps://youtu.be/s-clGkUbk84 を参考に、Nix を作成。

しかし、そこに待ち受けていたのは、昔見た数々のエラーだった!!

{
  description = "MAUI Linux with GtkSharp and .NET 8 SDK";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs = { self, nixpkgs }: 
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
    in {
      devShells.${system}.default = pkgs.mkShell {
        name = "maui-linux-dotnet-sdk";

        buildInputs = [
          pkgs.git
          pkgs.dotnet-sdk_8
          pkgs.gtk3
        ];

        shellHook = ''
          # Set environment variables for .NET SDK
          # export DOTNET_ROOT=/usr/share/dotnet
          # export DOTNET_ROOT=$(which dotnet)
          # export DOTNET_DIR=/nix/store/iggzq5cbp9dxzihm2sg6jsg46044v8pr-dotnet-sdk-wrapped-8.0.407/share/dotnet
          export DOTNET_DIR=$(dirname $(dirname $(which dotnet)))/share/dotnet

          echo "## Install Gtk Workload ##"
          curl -sSL https://raw.githubusercontent.com/HavenDV/Gtk/main/scripts/workload-install.sh | sudo bash /dev/stdin -d $DOTNET_DIR
          dotnet workload list

          # echo "## Install GtkSharp ##"
          # if [ ! -d "$HOME/GtkSharp" ]; then
          #   git clone https://github.com/GtkSharp/GtkSharp.git $HOME/GtkSharp
          # fi
          # cd $HOME/GtkSharp
          # sed -i 's/"8.0.100", "8.0.200"}/"8.0.100", "8.0.200", "8.0.300", "8.0.400"}/g' build.cake  # add missing version bands
          # dotnet tool restore
          # dotnet cake --verbosity=diagnostic --BuildTarget=InstallWorkload 
          # apt update
          apt install -y libgtk-3-dev libgtksourceview-4-0 
          # dotnet new install GtkSharp.Template.CSharp

          echo "## Clone maui-linux repo ##"
          if [ ! -d "$HOME/maui-linux" ]; then
            git clone https://github.com/jsuarezruiz/maui-linux.git $HOME/maui-linux
          fi
          cd $HOME/maui-linux
          sed -i 's/_IncludeAndroid>true/_IncludeAndroid>/g' Directory.Build.Override.props
          # optimize for Gtk
          sed -i 's/IncludeGtkTargetFrameworks Condition="'$(DotNetGtkWorkloadIsInstalled)' == 'true'">/IncludeGtkTargetFrameworks">/g' Directory.Build.props
          sed -i 's/TreatWarningsAsErrors>true/TreatWarningsAsErrors>false/g' Directory.Build.props
          sed -i '/<\/ItemGroup>/N; /<\/ItemGroup>\n  <ItemGroup Condition=.*TargetFramework.Contains(.*>/d' src/Graphics/src/Graphics.Gtk/Graphics.Gtk.csproj
          # build maui-linux
          dotnet build Microsoft.Maui.BuildTasks.slnf
          dotnet build Microsoft.Maui.Gtk.slnf

          # cd src/Controls/samples/Controls.Sample
          # dotnet run --framework net8.0-gtk
        '';
      };
    };
}
# 実行
nix develop
# エラー (抜粋)
/nix/store/6gp2czd71cb3n3d2bp7j6j9acifh4hx2-dotnet-sdk-8.0.407/share/dotnet/sdk/8.0.407/Microsoft.Common.CurrentVersion.targets(2176,5): warning : The referenced project '../../../Controls/src/Core/Controls.SourceGen.csproj' does not exist. [/home/lemon73/maui-linux/src/Controls/samples/Controls.Sample/Maui.Controls.Sample.csproj::TargetFramework=net8.0]
/nix/store/6gp2czd71cb3n3d2bp7j6j9acifh4hx2-dotnet-sdk-8.0.407/share/dotnet/sdk/8.0.407/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(215,5): error NETSDK1135: SupportedOSPlatformVersion 3.24 cannot be higher than TargetPlatformVersion 1.0. [/home/lemon73/maui-linux/src/BlazorWebView/src/Gtk/Microsoft.AspNetCore.Components.WebView.Gtk.csproj::TargetFramework=net8.0-gtk]
/nix/store/6gp2czd71cb3n3d2bp7j6j9acifh4hx2-dotnet-sdk-8.0.407/share/dotnet/sdk/8.0.407/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(215,5): error NETSDK1135: SupportedOSPlatformVersion 3.24 cannot be higher than TargetPlatformVersion 1.0. [/home/lemon73/maui-linux/src/BlazorWebView/samples/BlazorGtkApp/BlazorGtkApp.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Clipboard/Clipboard.Gtk.cs(11,19): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(42,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(58,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(71,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(73,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(75,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(79,29): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(103,40): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(110,41): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(289,83): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(298,84): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
    1 Warning(s)
    13 Error(s)

Time Elapsed 00:00:13.70
Lemon73Lemon73

あと、この状態でビルドすると、以下のようになる

cd src/Controls/samples/Controls.Sample
dotnet run --framework net8.0-gtk
# エラー
The launch profile "(Default)" could not be applied.
A usable launch profile could not be located.
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(42,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(58,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(71,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(73,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(75,17): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/DeviceDisplay/DeviceDisplay.Gtk.cs(79,29): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(103,40): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Clipboard/Clipboard.Gtk.cs(11,19): error CS0246: The type or namespace name 'Gdk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(110,41): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(289,83): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Essentials/src/Screenshot/Screenshot.shared.cs(298,84): error CS0246: The type or namespace name 'Gtk' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Essentials/src/Essentials.csproj::TargetFramework=net8.0-gtk]

The build failed. Fix the build errors and run again.
Lemon73Lemon73

問題がありそうな Essensial を置換しても変化はない、か。

sed -i 's/Include="..\..\..\Essentials\src\Essentials.csproj"/Include="GtkSharp.Maui.Essentials" Version="8.0.40--date20250228-1034.git-cd7b73d"/g' src/Controls/samples/Controls.Sample/Maui.Controls.Sample.csproj
Lemon73Lemon73
# add GtkSharp package
cd $HOME/maui-linux/src/Essentials/src
dotnet add package GtkSharp
cd $HOME/maui-linux/src/Core/src # こっちは特に関係ないかも
dotnet add package GtkSharp # こっちは特に関係ないかも

を追加することによって、エラーを減らすことに成功した。(まだ動かないが)

# エラー (抜粋)
/nix/store/6gp2czd71cb3n3d2bp7j6j9acifh4hx2-dotnet-sdk-8.0.407/share/dotnet/sdk/8.0.407/Microsoft.Common.CurrentVersion.targets(2176,5): warning : The referenced project '../../../Controls/src/Core/Controls.SourceGen.csproj' does not exist. [/home/lemon73/maui-linux/src/Controls/samples/Controls.Sample/Maui.Controls.Sample.csproj::TargetFramework=net8.0]
/nix/store/6gp2czd71cb3n3d2bp7j6j9acifh4hx2-dotnet-sdk-8.0.407/share/dotnet/sdk/8.0.407/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(215,5): error NETSDK1135: SupportedOSPlatformVersion 3.24 cannot be higher than TargetPlatformVersion 1.0. [/home/lemon73/maui-linux/src/BlazorWebView/samples/BlazorGtkApp/BlazorGtkApp.csproj::TargetFramework=net8.0-gtk]
/nix/store/6gp2czd71cb3n3d2bp7j6j9acifh4hx2-dotnet-sdk-8.0.407/share/dotnet/sdk/8.0.407/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(215,5): error NETSDK1135: SupportedOSPlatformVersion 3.24 cannot be higher than TargetPlatformVersion 1.0. [/home/lemon73/maui-linux/src/BlazorWebView/src/Gtk/Microsoft.AspNetCore.Components.WebView.Gtk.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Core/src/Platform/Gtk/WebviewExtensions.cs(2,7): error CS0246: The type or namespace name 'WebKit' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Core/src/Core.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Core/src/Platform/Gtk/MauiWebView.cs(5,28): error CS0246: The type or namespace name 'WebKit' could not be found (are you missing a using directive or an assembly reference?) [/home/lemon73/maui-linux/src/Core/src/Core.csproj::TargetFramework=net8.0-gtk]
/home/lemon73/maui-linux/src/Core/src/Handlers/WebView/WebViewHandler.cs(23,23): error CS0311: The type 'Microsoft.Maui.Platform.MauiWebView' cannot be used as type parameter 'TPlatformView' in the generic type or method 'ViewHandler<TVirtualView, TPlatformView>'. There is no implicit reference conversion from 'Microsoft.Maui.Platform.MauiWebView' to 'Gtk.Widget'. [/home/lemon73/maui-linux/src/Core/src/Core.csproj::TargetFramework=net8.0-gtk]
    1 Warning(s)
    5 Error(s)

Time Elapsed 00:00:10.30

なお、エラーの上3つはどうでも良い (目的である src/Controls/samples/Controls.Sample.Gtk/Controls.Sample.Gtk.csproj のビルド時に影響がない) ため、とりあえず無視する。

ログインするとコメントできます