cask "dotnet-sdk@preview" do # Differs from the `dotnet` formula by including additional closed-source components arch arm: "arm64", intel: "x64" version "11.0.100-rc.1.26425.128" sha256 arm: "2088706d2ac3cbf942db9b690441e86fdc9576135c1e1a336d165c490a69db74", intel: "3421b627c066b5eea0a47c349b761bd3028e7539c65eb328e271b594366524cf" url "https://builds.dotnet.microsoft.com/dotnet/Sdk/#{version}/dotnet-sdk-#{version}-osx-#{arch}.pkg" name ".NET SDK" desc "Developer platform" homepage "https://dotnet.microsoft.com/en-us/" livecheck do url "https://builds.dotnet.microsoft.com/dotnet/release-metadata/#{version.major_minor}/releases.json" strategy :json do |json| json["releases"]&.map do |release| release.dig("sdk", "version") end end end conflicts_with cask: [ "dotnet-runtime", "dotnet-runtime@preview", "dotnet-sdk", ] depends_on macos: :monterey pkg "dotnet-sdk-#{version.csv.first}-osx-#{arch}.pkg" binary "/usr/local/share/dotnet/dotnet" uninstall pkgutil: [ "com.microsoft.dotnet.*#{version.major_minor}*#{arch}", "com.microsoft.dotnet.sharedhost*#{arch}", "com.microsoft.netstandard.pack.targeting.*", ] zap pkgutil: "com.microsoft.dotnet.*", delete: [ "/etc/paths.d/dotnet", "/etc/paths.d/dotnet-cli-tools", ], trash: [ "~/.dotnet", "~/.nuget", ] end