Skip to content

Latest commit

Β 

History

History
287 lines (207 loc) Β· 8.67 KB

File metadata and controls

287 lines (207 loc) Β· 8.67 KB

.NET SDK and Runtime (AUR) (dotnet-bin)

Installs .NET SDK and runtime from AUR packages for Arch Linux

Example Usage

"features": {
    "ghcr.io/zyrakq/arch-devcontainer-features/dotnet-bin:1": {}
}

Options

Options Id Description Type Default Value
dotnetVersion .NET version to install (latest, 8.0, 7.0, 6.0) string latest
installEntityFramework Install Entity Framework Core CLI (dotnet-ef) boolean false
installAspNetCodeGenerator Install ASP.NET Core Code Generator boolean false
installDevCerts Install development certificates tool boolean false
installGlobalTools Comma-separated list of additional global tools to install string -

🟣 .NET SDK and Runtime (AUR)

πŸ“ Description

This feature installs .NET SDK and runtime from AUR packages for Arch Linux DevContainers. This is a legacy/compatibility feature that provides .NET through AUR binary packages. Automatically:

  • βœ… Installs .NET Host, SDK, and ASP.NET Core Runtime from AUR
  • πŸ“¦ Uses AUR binary packages (dotnet-*-bin) for compatibility
  • πŸ”„ Requires yay AUR helper for installation
  • πŸ› οΈ Configures global tools directory and PATH
  • 🌍 Optionally installs Entity Framework CLI, Code Generator, and custom tools

⚠️ Note: This feature is provided for backward compatibility. For new projects, consider using the main dotnet feature with official packages (packageManager: "pacman").

πŸš€ Quick Start with Templates

Instead of configuring from scratch, you can use ready-to-use solutions:

πŸ“‹ Example Configurations

Basic Installation (Latest .NET from AUR)

{
    "features": {
        "ghcr.io/zyrakq/arch-devcontainer-features/yay:1": {},
        "ghcr.io/zyrakq/arch-devcontainer-features/dotnet-bin:1": {}
    }
}

With Version Specification

{
    "features": {
        "ghcr.io/zyrakq/arch-devcontainer-features/yay:1": {},
        "ghcr.io/zyrakq/arch-devcontainer-features/dotnet-bin:1": {
            "dotnetVersion": "latest"
        }
    }
}

Advanced Configuration with Global Tools

{
    "features": {
        "ghcr.io/zyrakq/arch-devcontainer-features/yay:1": {},
        "ghcr.io/zyrakq/arch-devcontainer-features/dotnet-bin:1": {
            "installEntityFramework": true,
            "installAspNetCodeGenerator": true,
            "installDevCerts": true,
            "installGlobalTools": "dotnet-format"
        }
    }
}

Web Development Setup

{
    "features": {
        "ghcr.io/zyrakq/arch-devcontainer-features/yay:1": {},
        "ghcr.io/zyrakq/arch-devcontainer-features/dotnet-bin:1": {
            "installEntityFramework": true,
            "installAspNetCodeGenerator": true,
            "installDevCerts": true
        }
    }
}

API Development

{
    "features": {
        "ghcr.io/zyrakq/arch-devcontainer-features/yay:1": {},
        "ghcr.io/zyrakq/arch-devcontainer-features/dotnet-bin:1": {
            "installEntityFramework": true,
            "installGlobalTools": "dotnet-format"
        }
    }
}

πŸ“‹ Options

Option Type Default Description
dotnetVersion string "latest" .NET version to install (AUR packages provide latest versions)
installEntityFramework boolean false Install Entity Framework Core CLI (dotnet-ef)
installAspNetCodeGenerator boolean false Install ASP.NET Core Code Generator
installDevCerts boolean false Install development certificates tool
installGlobalTools string "" Comma-separated list of additional global tools to install

Note: ASP.NET Core Runtime is automatically included with AUR packages and cannot be disabled.

πŸ”§ What's Installed

Core Components (AUR Binary Packages)

  • .NET Host (dotnet-host-bin) - Core .NET runtime host
  • .NET Runtime (dotnet-runtime-bin) - .NET runtime
  • .NET SDK (dotnet-sdk-bin) - Complete .NET development kit
  • ASP.NET Core Runtime (aspnet-runtime-bin) - Web application runtime (automatically included)

Global Tools (Optional)

  • Entity Framework Core CLI (dotnet-ef) - Database migrations and scaffolding
  • ASP.NET Core Code Generator (dotnet-aspnet-codegenerator) - Code scaffolding for MVC/API
  • Development Certificates (dotnet-dev-certs) - HTTPS development certificates
  • Custom Tools - Any additional tools specified in installGlobalTools

πŸ› οΈ Global Tools

After installation, you can install additional global tools:

# Install Entity Framework CLI
dotnet tool install --global dotnet-ef

# Install code formatting tool
dotnet tool install --global dotnet-format

# List installed tools
dotnet tool list --global

# Update all tools
dotnet tool update --global dotnet-ef

οΏ½ Verification

After installation, verify everything works:

# Check .NET version
dotnet --version

# List installed SDKs
dotnet --list-sdks

# List installed runtimes
dotnet --list-runtimes

# Check global tools
dotnet tool list --global

# Create a new console app (test)
dotnet new console -n TestApp
cd TestApp
dotnet run

βœ… Compatibility

  • Architecture: linux/amd64, linux/arm64
  • Operating System: Arch Linux
  • Requirements: yay AUR helper (installed via yay feature)

πŸ“¦ Installation Order

This feature requires and installs after:

  • ghcr.io/zyrakq/arch-devcontainer-features/yay - Required for AUR package installation
{
    "features": {
        "ghcr.io/zyrakq/arch-devcontainer-features/yay:1": {},
        "ghcr.io/zyrakq/arch-devcontainer-features/dotnet-bin:1": {}
    }
}

πŸ—οΈ Architecture

This feature uses a stable architecture with Git submodules:

  • Arch Linux Utilities: Used through bartventer/arch-devcontainer-features
  • Stable Version: Scripts downloaded from submodule commit hash
  • AUR Integration: Uses yay for installing binary packages from AUR
  • Simplified: Minimal configuration options for basic .NET development

πŸ”§ Troubleshooting

Common Issues

yay command not found

  • Ensure the yay feature is installed first
  • Check the installation order in your devcontainer.json

dotnet command not found

  • Restart your terminal or reload shell profile
  • Check if PATH includes dotnet tools directory

AUR package installation fails

  • Verify internet connection
  • Check if yay is properly configured
  • Try installing manually: yay -S dotnet-sdk-bin

Global tool installation fails

  • Verify internet connection
  • Check if the tool name is correct
  • Try installing manually: dotnet tool install --global <tool-name>

Permission errors

  • The feature automatically handles permissions
  • Global tools are installed in user directory (~/.dotnet/tools)

Getting Help

πŸ“ Notes

  • Legacy Feature: Provided for backward compatibility with existing configurations
  • AUR Packages: Uses binary packages from AUR (dotnet-*-bin)
  • Simplified: Minimal options compared to the main dotnet feature
  • Requires yay: Must install yay feature first
  • Latest Versions: AUR binary packages typically provide latest .NET versions
  • Global Tools Support: Supports installation of Entity Framework CLI, ASP.NET Code Generator, and custom tools

πŸ“‹ Requirements

  • Container must be running Arch Linux
  • yay AUR helper must be installed (via yay feature)
  • Internet connection for downloading packages from AUR
  • User must have appropriate permissions for package installation

πŸ”„ Migration

For new projects, consider migrating to the main dotnet feature:

{
    "features": {
        "ghcr.io/zyrakq/arch-devcontainer-features/dotnet:1": {
            "packageManager": "pacman"
        }
    }
}

This provides better integration with system libraries and faster installation.


Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md.