.NET

💡 AnduinOS 已驗證應用程式 - 開源

.NET is an AnduinOS verified app and it runs awesome on AnduinOS, with easy installation and automatic updates.

.NET 是一個免費、跨平台、開源的開發者平台,用於建構各種不同類型的應用程式。

首先。新增 .NET backports 存放庫(如果適用)。

if [[ "$(lsb_release -sc)" =~ ^(devel|jammy|noble)$ ]]; then
  sudo add-apt-repository ppa:dotnet/backports
fi

若要於 AnduinOS 上安裝 .NET 10,您可以執行:

sudo apt update
sudo apt install dotnet10

要在 AnduinOS 上安裝 .NET 9,您可以執行:

sudo apt update
sudo apt install dotnet9

要在 AnduinOS 上安裝 .NET 8,您可以執行:

sudo apt update
sudo apt install dotnet8

就是這樣。您現在可以開始在 AnduinOS 上使用 .NET。

mkdir myapp
cd myapp
dotnet new console
dotnet run

.NET 全域工具

您可能需要安裝一些全域工具以協助開發工作。您可以使用以下指令來安裝它們:

# Dotnet tools
function TryInstallDotnetTool {
  toolName=$1
  globalTools=$(dotnet tool list --global)

  if [[ $globalTools =~ $toolName ]]; then
    echo "$toolName is already installed. Updating it.." 
    dotnet tool update --global $toolName --interactive
  else
    echo "$toolName is not installed. Installing it.."
    if ! dotnet tool install --global $toolName --interactive ; then
      echo "$toolName failed to be installed. Trying updating it.."
      dotnet tool update --global $toolName --interactive
    fi
  fi
}

TryInstallDotnetTool "dotnet-ef"
TryInstallDotnetTool "Aiursoft.Static"
留言 (0)

尚無留言。搶先發表第一則!