Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# GitHub Copilot Setup Steps for NLWebNet
# This file defines the setup steps needed to work with the NLWebNet repository

name: Setup .NET 9 Environment for NLWebNet
description: Install .NET 9 SDK and restore dependencies for the NLWebNet library and demo application

steps:
- name: Install .NET 9 SDK
description: Install the .NET 9 SDK using the official Microsoft installation methods
run: |
# Check if .NET 9 is already installed
if command -v dotnet &> /dev/null && dotnet --list-sdks | grep -q "9\."; then
echo "✅ .NET 9 SDK is already installed"
dotnet --version
exit 0
fi

# Install .NET 9 SDK using official Microsoft methods
echo "📦 Installing .NET 9 SDK..."

# For Ubuntu/Debian
if command -v apt &> /dev/null; then
# Add Microsoft package repository
wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

# Install .NET 9 SDK
sudo apt update
sudo apt install -y dotnet-sdk-9.0

# For macOS with Homebrew
elif command -v brew &> /dev/null; then
brew install dotnet
Copy link

Copilot AI Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using 'brew install --cask dotnet-sdk' for macOS installation based on the latest installation guidelines to ensure the correct .NET SDK is installed.

Suggested change
brew install dotnet
brew install --cask dotnet-sdk

Copilot uses AI. Check for mistakes.

# For other systems, use the official install script (same as GitHub Actions uses internally)
else
echo "Using official Microsoft .NET install script..."
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0 --install-dir ~/.dotnet

# Add .NET to PATH if not already present
if [[ ":$PATH:" != *":$HOME/.dotnet:"* ]]; then
echo 'export PATH="$HOME/.dotnet:$PATH"' >> ~/.bashrc
export PATH="$HOME/.dotnet:$PATH"
fi
fi

# Verify installation
echo "🔍 Verifying .NET installation..."
dotnet --version
dotnet --info

- name: Restore NuGet packages
description: Restore all NuGet package dependencies for the solution
run: |
dotnet restore

- name: Build solution
description: Build the entire solution to verify setup is working
run: |
dotnet build --configuration Debug --no-restore

- name: Verify setup
description: Run a quick verification that everything is set up correctly
run: |
echo "✅ .NET 9 SDK installed successfully"
echo "✅ NuGet packages restored"
echo "✅ Solution builds successfully"
echo ""
echo "🚀 You can now work with the NLWebNet repository!"
echo ""
echo "Quick start commands:"
echo " - Build: dotnet build"
echo " - Test: dotnet test"
echo " - Run demo: dotnet run --project demo"