AvaloniaVS2022

funiyi816發表於2024-11-13

AvaloniaVS.VS2022安裝和使用

首先下載VS2022專業版

https://visualstudio.microsoft.com/zh-hans/downloads/

image-20241113082713868

image-20241113092111414

安裝Avalonia for Visual Studio 2022擴充套件包

image-20241113083825332

這裡直接安裝經常失敗,我下載AvaloniaVS.VS2022.vsix 單獨安裝,直接以管理員安裝就可以,時間有點長,耐心等待

image-20241113092537426

image-20241113084150337image-20241113084205005image-20241113084344980

開啟VS2022 開始建立專案

image-20241113084639609

image-20241113084750103

image-20241113084810076

image-20241113084829379

image-20241113084846836

image-20241113085016063

image-20241113085213025

image-20241113085341755

image-20241113085430278

那麼怎麼樣把程式執行在 Ubuntu 20.04 X64 Linux

直接複製過去是不行的,我們需要使用釋出的方式

image-20241113085901157

image-20241113085936545

image-20241113085951558

image-20241113090043591

image-20241113090244957

image-20241113090327098

image-20241113090421893

image-20241113090508029

image-20241113090653630

image-20241113091153635

image-20241113091706133

image-20241113091905004

感覺好像需要設定開啟方式

image-20241113120525861

dell@dell-Precision-7920-Tower:~/桌面$ sudo add-apt-repository ppa:kisak/kisak-mesa
[sudo] dell 的密碼:
PPA publishes dbgsym, you may need to include 'main/debug' component
源: 'Types: deb
URIs: https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu/
Suites: noble
Components: main
'
描述:
The goal of this PPA is to provide the latest point release of Mesa plus select non-invasive early backports. Deviations from upstream packages are listed on the package details page.

--- Support status ---

Bionic (18.04) - Discontinued - Long term users can use kisak-mesa stable
Focal (20.04) - Supported
Jammy (22.04) - Supported
Noble (24.04) - Preliminary support (Not tested locally)

Note: Please report any issues to mesa. ARM builds are not tested locally.

--- Is this PPA stable? ---

Short answer: Mostly.

Long answer: Compared to bleeding edge mesa PPAs, there is a much lower chance of complications, but as Ubuntu LTS releases age, the odds of unexpected interactions between older kernels / compilers / X increases with each major release. Anomalies are inevitable the further the host system gets from the configuration active mesa developers use on a daily basis. If you value stability over support, https://launchpad.net/~kisak/+archive/ubuntu/turtle/ is available as an alternative.

In the event that there is a major issue with new mesa on an older Ubuntu LTS and the mesa devs are not interested in triaging the issue, then the Ubuntu LTS release will be dropped from this PPA and the last release pushed to kisak-mesa stable will be frozen.

--- Package status ---

llvm - Following latest point release supported by mesa

  • Focal / Jammy frozen on llvm 15
    mesa - Following latest point release
    libdrm - Updating as needed for mesa

Mesa 24.2.0 note:
This update cycle dropped some hacks that allowed rusticl on Jammy.
Upstream added NVK, but is only sane on Noble, with missing i386 dependencies.

--- Removal ---

It's strongly recommended to remove this PPA before upgrading to a newer Ubuntu release or using another mesa PPA.

sudo apt install ppa-purge
sudo ppa-purge ppa:kisak/kisak-mesa

Note: Using ppa-purge with Ubuntu derivatives needs to include -d <based_on_name> to work safely. For example, Linux Mint 20 is based on Ubuntu Focal, so that would make it:

sudo ppa-purge -d focal ppa:kisak/kisak-mesa

--- Donations ---

I can't accept donations and any random donation site account is a scam. If you have some extra money burning a hole in your pocket, please consider sending it to a charity of your choice (for the poors, animals, whatever else you may think it might need it), then send Oibaf a note that I stole the suggestion from his PPA.
更多資訊:https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa
正在新增源。
按 [ENTER] 繼續,或按 Ctrl-c 取消。
命中:1 http://security.ubuntu.com/ubuntu noble-security InRelease
命中:2 http://archive.ubuntu.com/ubuntu noble InRelease
獲取:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
獲取:4 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble InRelease [24.1 kB]
命中:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
獲取:6 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 Packages [5,260 B]
獲取:7 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main Translation-en [4,056 B]
已下載 160 kB,耗時 3秒 (59.1 kB/s)
正在讀取軟體包列表... 完成
dell@dell-Precision-7920-Tower:~/桌面$ sudo apt update
命中:1 http://security.ubuntu.com/ubuntu noble-security InRelease
命中:2 http://archive.ubuntu.com/ubuntu noble InRelease
命中:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
命中:4 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble InRelease
命中:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
正在讀取軟體包列表... 完成
正在分析軟體包的依賴關係樹... 完成
正在讀取狀態資訊... 完成
有 13 個軟體包可以升級。請執行 ‘apt list --upgradable’ 來檢視它們。
dell@dell-Precision-7920-Tower:~/桌面$ sudo apt upgrade
正在讀取軟體包列表... 完成
正在分析軟體包的依賴關係樹... 完成
正在讀取狀態資訊... 完成
正在計算更新... 完成
下列軟體包是自動安裝的並且現在不需要了:
libgl1-amber-dri
使用'sudo apt autoremove'來解除安裝它(它們)。
下列【新】軟體包將被安裝:
mesa-libgallium
下列軟體包將被升級:
libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0 libgbm1 libgl1-mesa-dri
libglapi-mesa libglx-mesa0 libxatracker2 mesa-vulkan-drivers
升級了 13 個軟體包,新安裝了 1 個軟體包,要解除安裝 0 個軟體包,有 0 個軟體包未被升級。
需要下載 31.1 MB 的歸檔。
解壓縮後會消耗 68.9 MB 的額外空間。
您希望繼續執行嗎? [Y/n] Y
獲取:1 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libdrm-common all 2.4.122-1kisakn [8,370 B]
獲取:2 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libdrm2 amd64 2.4.122-1kisakn [40.6 kB]
獲取:3 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libdrm-amdgpu1 amd64 2.4.122-1kisakn [23.2 kB]
獲取:4 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libdrm-intel1 amd64 2.4.122-1kisakn [66.4 kB]
獲取:5 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libdrm-nouveau2 amd64 2.4.122-1kisakn [20.2 kB]
獲取:6 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libdrm-radeon1 amd64 2.4.122-1kisakn [23.3 kB]
獲取:7 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libgl1-mesa-dri amd64 24.2.6kisak1n [45.6 kB]
獲取:8 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libglx-mesa0 amd64 24.2.6kisak1n [164 kB]
獲取:9 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libegl-mesa0 amd64 24.2.6kisak1n [140 kB]
獲取:10 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libglapi-mesa amd64 24.2.6kisak1n [41.9 kB]
獲取:11 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 mesa-libgallium amd64 24.2.6kisak1n [9,800 kB]
獲取:12 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libgbm1 amd64 24.2.6kisak1n [42.5 kB]
獲取:13 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 libxatracker2 amd64 24.2.6kisak1n [2,427 kB]
獲取:14 https://ppa.launchpadcontent.net/kisak/kisak-mesa/ubuntu noble/main amd64 mesa-vulkan-drivers amd64 24.2.6kisak1n [18.2 MB]
已下載 31.1 MB,耗時 20分 13秒 (25.6 kB/s)
(正在讀取資料庫 ... 系統當前共安裝有 186921 個檔案和目錄。)
準備解壓 .../00-libdrm-common_2.4.122-1kisakn_all.deb ...
正在解壓 libdrm-common (2.4.122-1kisakn) 並覆蓋 (2.4.120-2build1) ...
準備解壓 .../01-libdrm2_2.4.122-1kisakn_amd64.deb ...
正在解壓 libdrm2:amd64 (2.4.122-1kisakn) 並覆蓋 (2.4.120-2build1) ...
準備解壓 .../02-libdrm-amdgpu1_2.4.122-1kisakn_amd64.deb ...
正在解壓 libdrm-amdgpu1:amd64 (2.4.122-1kisakn) 並覆蓋 (2.4.120-2build1) ...
準備解壓 .../03-libdrm-intel1_2.4.122-1kisakn_amd64.deb ...
正在解壓 libdrm-intel1:amd64 (2.4.122-1kisakn) 並覆蓋 (2.4.120-2build1) ...
準備解壓 .../04-libdrm-nouveau2_2.4.122-1kisakn_amd64.deb ...
正在解壓 libdrm-nouveau2:amd64 (2.4.122-1kisakn) 並覆蓋 (2.4.120-2build1) ...
準備解壓 .../05-libdrm-radeon1_2.4.122-1kisakn_amd64.deb ...
正在解壓 libdrm-radeon1:amd64 (2.4.122-1kisakn) 並覆蓋 (2.4.120-2build1) ...
準備解壓 .../06-libgl1-mesa-dri_24.2.6kisak1n_amd64.deb ...
正在解壓 libgl1-mesa-dri:amd64 (24.2.6kisak1n) 並覆蓋 (24.0.9-0ubuntu0.2) ...
準備解壓 .../07-libglx-mesa0_24.2.6kisak1n_amd64.deb ...
正在解壓 libglx-mesa0:amd64 (24.2.6kisak1n) 並覆蓋 (24.0.9-0ubuntu0.2) ...
準備解壓 .../08-libegl-mesa0_24.2.6kisak1n_amd64.deb ...
正在解壓 libegl-mesa0:amd64 (24.2.6kisak1n) 並覆蓋 (24.0.9-0ubuntu0.2) ...
準備解壓 .../09-libglapi-mesa_24.2.6kisak1n_amd64.deb ...
正在解壓 libglapi-mesa:amd64 (24.2.6kisak1n) 並覆蓋 (24.0.9-0ubuntu0.2) ...
正在選中未選擇的軟體包 mesa-libgallium:amd64。
準備解壓 .../10-mesa-libgallium_24.2.6kisak1n_amd64.deb ...
正在解壓 mesa-libgallium:amd64 (24.2.6kisak1n) ...
準備解壓 .../11-libgbm1_24.2.6kisak1n_amd64.deb ...
正在解壓 libgbm1:amd64 (24.2.6kisak1n) 並覆蓋 (24.0.9-0ubuntu0.2) ...
準備解壓 .../12-libxatracker2_24.2.6kisak1n_amd64.deb ...
正在解壓 libxatracker2:amd64 (24.2.6kisak1n) 並覆蓋 (24.0.9-0ubuntu0.2) ...
準備解壓 .../13-mesa-vulkan-drivers_24.2.6kisak1n_amd64.deb ...
正在解壓 mesa-vulkan-drivers:amd64 (24.2.6kisak1n) 並覆蓋 (24.0.9-0ubuntu0.2) ...
正在設定 libglapi-mesa:amd64 (24.2.6kisak1n) ...
正在設定 libdrm-common (2.4.122-1kisakn) ...
正在設定 libdrm2:amd64 (2.4.122-1kisakn) ...
正在設定 libdrm-amdgpu1:amd64 (2.4.122-1kisakn) ...
正在設定 mesa-vulkan-drivers:amd64 (24.2.6kisak1n) ...
正在設定 libdrm-nouveau2:amd64 (2.4.122-1kisakn) ...
正在設定 libdrm-radeon1:amd64 (2.4.122-1kisakn) ...
正在設定 libdrm-intel1:amd64 (2.4.122-1kisakn) ...
正在設定 libxatracker2:amd64 (24.2.6kisak1n) ...
正在設定 mesa-libgallium:amd64 (24.2.6kisak1n) ...
正在設定 libgbm1:amd64 (24.2.6kisak1n) ...
正在設定 libgl1-mesa-dri:amd64 (24.2.6kisak1n) ...
正在設定 libegl-mesa0:amd64 (24.2.6kisak1n) ...
正在設定 libglx-mesa0:amd64 (24.2.6kisak1n) ...
正在處理用於 libc-bin (2.39-0ubuntu8.3) 的觸發器 ...
dell@dell-Precision-7920-Tower:~/桌面$

image-20241113123252608

雙擊執行,暫時還不行,就這樣吧,先寫程式了

image-20241113125059369

這個方法是OK的,謝謝