RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Copilot instructions/PowerShell/PowerShell

Copilot instructions

.github/instructions/build-configuration-guide.instructions.md
Copilot instructions

Quality

74/100

Scores the file, not the repository.

Length

424 words

14 headings · 7 code blocks

Repository

55k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
PowerShell/PowerShell/.github/instructions/build-configuration-guide.instructions.mdRawGitHub
1---
2applyTo:
3 - "build.psm1"
4 - "tools/ci.psm1"
5 - ".github/**/*.yml"
6 - ".github/**/*.yaml"
7 - ".pipelines/**/*.yml"
8---
9 
10# Build Configuration Guide
11 
12## Choosing the Right Configuration
13 
14### For Testing
15 
16**Use: Default (Debug)**
17 
18```yaml
19- name: Build for Testing
20 shell: pwsh
21 run: |
22 Import-Module ./tools/ci.psm1
23 Start-PSBuild
24```
25 
26**Why Debug:**
27- Includes debugging symbols
28- Better error messages
29- Faster build times
30- Suitable for xUnit and Pester tests
31 
32**Do NOT use:**
33- `-Configuration 'Release'` (unnecessary for tests)
34- `-ReleaseTag` (not needed for tests)
35- `-CI` (unless you specifically need Pester module)
36 
37### For Release/Packaging
38 
39**Use: Release with version tag and public NuGet feeds**
40 
41```yaml
42- name: Build for Release
43 shell: pwsh
44 run: |
45 Import-Module ./build.psm1
46 Import-Module ./tools/ci.psm1
47 Switch-PSNugetConfig -Source Public
48 $releaseTag = Get-ReleaseTag
49 Start-PSBuild -Configuration 'Release' -ReleaseTag $releaseTag
50```
51 
52**Why Release:**
53- Optimized binaries
54- No debug symbols (smaller size)
55- Production-ready
56 
57**Why Switch-PSNugetConfig -Source Public:**
58- Switches NuGet package sources to public feeds (nuget.org and public Azure DevOps feeds)
59- Required for CI/CD environments that don't have access to private feeds
60- Uses publicly available packages instead of Microsoft internal feeds
61 
62### For Code Coverage
63 
64**Use: CodeCoverage configuration**
65 
66```yaml
67- name: Build with Coverage
68 shell: pwsh
69 run: |
70 Import-Module ./tools/ci.psm1
71 Start-PSBuild -Configuration 'CodeCoverage'
72```
73 
74## Platform Considerations
75 
76### All Platforms
77 
78Same commands work across Linux, Windows, and macOS:
79 
80```yaml
81strategy:
82 matrix:
83 os: [ubuntu-latest, windows-latest, macos-latest]
84runs-on: ${{ matrix.os }}
85steps:
86 - name: Build PowerShell
87 shell: pwsh
88 run: |
89 Import-Module ./tools/ci.psm1
90 Start-PSBuild
91```
92 
93### Output Locations
94 
95**Linux/macOS:**
96```
97src/powershell-unix/bin/Debug/<netversion>/<runtime>/publish/
98```
99 
100**Windows:**
101```
102src/powershell-win-core/bin/Debug/<netversion>/<runtime>/publish/
103```
104 
105## Best Practices
106 
1071. Use default configuration for testing
1082. Avoid redundant parameters
1093. Match configuration to purpose
1104. Use `-CI` only when needed
1115. Always specify `-ReleaseTag` for release or packaging builds
1126. Use `Switch-PSNugetConfig -Source Public` in CI/CD for release builds
113 
114## NuGet Feed Configuration
115 
116### Switch-PSNugetConfig
117 
118The `Switch-PSNugetConfig` function in `build.psm1` manages NuGet package source configuration.
119 
120**Available Sources:**
121 
122- **Public**: Uses public feeds (nuget.org and public Azure DevOps feeds)
123 - Required for: CI/CD environments, public builds, packaging
124 - Does not require authentication
125 
126- **Private**: Uses internal PowerShell team feeds
127 - Required for: Internal development with preview packages
128 - Requires authentication credentials
129 
130- **NuGetOnly**: Uses only nuget.org
131 - Required for: Minimal dependency scenarios
132 
133**Usage:**
134 
135```powershell
136# Switch to public feeds (most common for CI/CD)
137Switch-PSNugetConfig -Source Public
138 
139# Switch to private feeds with authentication
140Switch-PSNugetConfig -Source Private -UserName $userName -ClearTextPAT $pat
141 
142# Switch to nuget.org only
143Switch-PSNugetConfig -Source NuGetOnly
144```
145 
146**When to Use:**
147 
148- **Always use `-Source Public`** before building in CI/CD workflows
149- Use before any build that will create packages for distribution
150- Use in forks or environments without access to Microsoft internal feeds
151 

Sections

  • Build Configuration Guide
  • Choosing the Right Configuration
  • For Testing
  • For Release/Packaging
  • For Code Coverage
  • Platform Considerations
  • All Platforms
  • Output Locations
  • Best Practices
  • NuGet Feed Configuration
  • Switch-PSNugetConfig
  • Switch to public feeds (most common for CI/CD)
  • Switch to private feeds with authentication
  • Switch to nuget.org only

What it covers

buildtestcode-styletesting-strategysecuritydeployment

Stack — with the evidence

csharp

(1.00)

dotnet

(1.00)

github-actions

(0.60)

Glob targeting

  • build.psm1
  • tools/ci.psm1
  • .github/**/*.yml
  • .github/**/*.yaml
  • .pipelines/**/*.yml

Format

Copilot instructions

Two layers: one always-on repo file, plus optional glob-scoped instruction files. Lives under .github/ rather than the repo root, which is the tell that it is aimed at the GitHub platform surface as much as the editor.

What the corpus says about it

Repository

Owner
PowerShell
Language
—
License
—
Archived
no

All configs in this repo

Also in PowerShell/PowerShell

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
PowerShell/PowerShell.github/instructions/code-review-branch-strategy.instructions.md · 55kCopilot instructionscsharpdotnet+1lint-formatstyletypesgit+162/1003 days ago
PowerShell/PowerShell.github/instructions/instruction-file-format.instructions.md · 55kCopilot instructionscsharpdotnet+1buildlint-formatstylearch+376/1003 days ago
PowerShell/PowerShell.github/instructions/pester-set-itresult-pattern.instructions.md · 55kCopilot instructionscsharpdotnet+1setupstylearch62/1003 days ago
PowerShell/PowerShell.github/instructions/powershell-automatic-variables.instructions.md · 55kCopilot instructionscsharpdotnet+1stylearchgitdeployment+169/1003 days ago
PowerShell/PowerShell.github/instructions/pester-test-status-and-working-meaning.instructions.md · 55kCopilot instructionscsharpdotnet+1teststyle54/1003 days ago
PowerShell/PowerShell.github/instructions/build-and-packaging-steps.instructions.md · 55kCopilot instructionscsharpdotnet+1buildagent-behaviour58/1003 days ago
PowerShell/PowerShell.github/instructions/build-checkout-prerequisites.instructions.md · 55kCopilot instructionscsharpdotnet+1setupbuildstylearch+181/1003 days ago
PowerShell/PowerShell.github/instructions/log-grouping-guidelines.instructions.md · 55kCopilot instructionscsharpdotnet+1buildtestdo-not77/1003 days ago
PowerShell/PowerShell.github/instructions/onebranch-condition-syntax.instructions.md · 55kCopilot instructionscsharpdotnet+1buildstylearchdeployment+173/1003 days ago
PowerShell/PowerShell.github/instructions/onebranch-restore-phase-pattern.instructions.md · 55kCopilot instructionscsharpdotnet+1arch54/1003 days ago
PowerShell/PowerShell.github/instructions/onebranch-signing-configuration.instructions.md · 55kCopilot instructionscsharpdotnet+1buildstyledeployment62/1003 days ago
PowerShell/PowerShell.github/instructions/powershell-module-organization.instructions.md · 55kCopilot instructionscsharpdotnet+1buildteststylearch+269/1003 days ago
PowerShell/PowerShell.github/instructions/powershell-parameter-naming.instructions.md · 55kCopilot instructionscsharpdotnet+1styledo-not65/1003 days ago
PowerShell/PowerShell.github/instructions/publishing-pester-result.instructions.md · 55kCopilot instructionscsharpdotnet+1testlint-formatstylearch+369/1003 days ago
PowerShell/PowerShell.github/instructions/script-module-file-format.instructions.md · 55kCopilot instructionscsharpdotnet+1lint-format54/1003 days ago
PowerShell/PowerShell.github/instructions/start-native-execution.instructions.md · 55kCopilot instructionscsharpdotnet+1buildstylearchgit+186/1003 days ago
PowerShell/PowerShell.github/instructions/start-psbuild-basics.instructions.md · 55kCopilot instructionscsharpdotnet+1buildtesting-strategydeploymentagent-behaviour54/1003 days ago
PowerShell/PowerShell.github/instructions/troubleshooting-builds.instructions.md · 55kCopilot instructionscsharpdotnet+1buildgitdeployment54/1003 days ago
Diff against .github/instructions/code-review-branch-strategy.instructions.md Diff against .github/instructions/instruction-file-format.instructions.md Diff against .github/instructions/pester-set-itresult-pattern.instructions.md Diff against .github/instructions/powershell-automatic-variables.instructions.md Diff against .github/instructions/pester-test-status-and-working-meaning.instructions.md Diff against .github/instructions/build-and-packaging-steps.instructions.md Diff against .github/instructions/build-checkout-prerequisites.instructions.md Diff against .github/instructions/log-grouping-guidelines.instructions.md Diff against .github/instructions/onebranch-condition-syntax.instructions.md Diff against .github/instructions/onebranch-restore-phase-pattern.instructions.md Diff against .github/instructions/onebranch-signing-configuration.instructions.md Diff against .github/instructions/powershell-module-organization.instructions.md Diff against .github/instructions/powershell-parameter-naming.instructions.md Diff against .github/instructions/publishing-pester-result.instructions.md Diff against .github/instructions/script-module-file-format.instructions.md Diff against .github/instructions/start-native-execution.instructions.md Diff against .github/instructions/start-psbuild-basics.instructions.md Diff against .github/instructions/troubleshooting-builds.instructions.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63Copilot instructionstypescriptreact+7buildlint-formatstylearch+4100/1003 days ago
louislam/uptime-kuma.github/copilot-instructions.md · 90kCopilot instructionstypescriptjavascript+10setupbuildtestlint-format+9100/1003 days ago
pytorch/pytorch.github/copilot-instructions.md · 102kCopilot instructionspythonpytorch+4setupbuildteststyle+5100/1003 days ago
dotnet/roslyn.github/instructions/Compiler.instructions.md · 21kCopilot instructionscsharpdotnet+1buildteststylearch+399/1003 days ago
JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31kCopilot instructionstypescriptnode+7buildlint-formatstylearch+397/1002 days ago
hiyouga/LlamaFactory.github/copilot-instructions.md · 74kCopilot instructionspythontransformers+4setupbuildtestlint-format+597/1002 days ago
rtk-ai/rtk.github/copilot-instructions.md · 75kCopilot instructionsrustgithub-actionsbuildtestlint-formatstyle+297/1003 days ago
dotnet/roslyn.github/copilot-instructions.md · 21kCopilot instructionscsharpdotnet+1buildteststylearch+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack