1- name : Setup .NET 9 Environment
2- description : Install .NET 9 SDK and required workloads for NLWebNet development
1+ # GitHub Copilot Setup Steps for NLWebNet
2+ # This file defines the setup steps needed to work with the NLWebNet repository
3+
4+ name : Setup .NET 9 Environment for NLWebNet
5+ description : Install .NET 9 SDK and restore dependencies for the NLWebNet library and demo application
6+
37steps :
48 - name : Install .NET 9 SDK
9+ description : Download and install the .NET 9 SDK for Ubuntu using the official Microsoft install script
510 run : |
6- # Download and install .NET 9 SDK
7- curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version latest --channel 9.0
11+ # Check if .NET 9 is already installed
12+ if command -v dotnet &> /dev/null && dotnet --list-sdks | grep -q "9\."; then
13+ echo "✅ .NET 9 SDK is already installed"
14+ dotnet --version
15+ # Still need to install Aspire workload if not present
16+ if ! dotnet workload list | grep -q "aspire"; then
17+ echo "📦 Installing Aspire workload..."
18+ dotnet workload install aspire
19+ fi
20+ exit 0
21+ fi
822
9- # Add .NET to PATH for current session
10- export DOTNET_ROOT=$HOME/.dotnet
11- export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
23+ # Download and install .NET 9 SDK using official Microsoft install script
24+ echo "📦 Installing .NET 9 SDK..."
25+ curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 9.0 --install-dir ~/.dotnet
1226
13- # Verify installation
14- $HOME/.dotnet/dotnet --version
27+ # Add .NET to PATH if not already present
28+ if [[ ":$PATH:" != *":$HOME/.dotnet:"* ]]; then
29+ echo 'export PATH="$HOME/.dotnet:$PATH"' >> ~/.bashrc
30+ export PATH="$HOME/.dotnet:$PATH"
31+ fi
1532
16- # Set environment variables for subsequent steps
33+ # Set environment variables for subsequent steps (GitHub Actions specific)
1734 echo "DOTNET_ROOT=$HOME/.dotnet" >> $GITHUB_ENV
1835 echo "$HOME/.dotnet" >> $GITHUB_PATH
1936 echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
2037
21- # Install required workloads
22- $HOME/.dotnet/dotnet workload install aspire
38+ # Verify installation
39+ echo "🔍 Verifying .NET installation..."
40+ dotnet --version
41+ dotnet --info
42+
43+ # Install required workloads including Aspire
44+ echo "📦 Installing required workloads..."
45+ dotnet workload install aspire
46+
47+ - name : Restore NuGet packages
48+ description : Restore all NuGet package dependencies for the solution
49+ run : |
50+ dotnet restore
51+
52+ - name : Build solution
53+ description : Build the entire solution to verify setup is working
54+ run : |
55+ dotnet build --configuration Debug --no-restore
56+
57+ - name : Verify setup
58+ description : Run a quick verification that everything is set up correctly
59+ run : |
60+ echo "✅ .NET 9 SDK installed successfully"
61+ echo "✅ Required workloads (including Aspire) installed"
62+ echo "✅ NuGet packages restored"
63+ echo "✅ Solution builds successfully"
64+ echo ""
65+ echo "🚀 You can now work with the NLWebNet repository!"
66+ echo ""
67+ echo "Quick start commands:"
68+ echo " - Build: dotnet build"
69+ echo " - Test: dotnet test"
70+ echo " - Run demo: dotnet run --project demo"
0 commit comments