-
Notifications
You must be signed in to change notification settings - Fork 3
Create copilot-setup-steps.yml for .NET 9 #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| # 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" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.