moq
Copilot instructions6.4k starsChanged 34 days agoMITView on GitHub
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here. Project implemention details, design and key decisions should be documented in a top-level AGENTS.md file at the repo root. Keep this file updated whenever you make change significant chang
- Reads credentials
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
10 rules. About 0 are common, 5 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
If tests fail due to Azure Storage, run the following commands and retry: npm install azurite and npx azurite &
- Very specific: line 37
Type references: Prefer language keywords over framework type names (int vs Int32)
- Distinctive: line 38
Modern C# features: Use object/collection initializers, coalesce expressions when possible, use var when the type is apparent from the …
- Very specific: line 39
Visibility modifiers: only explicitly specify visibility when different from the default (e.g.
- Very specific: line 62
Add to appropriate .csproj file
- Very specific: line 63
Run dotnet restore to update dependencies
- Distinctive: line 64
Ensure version consistency across projects where applicable
- Distinctive: line 85
All PRs must pass format validation
- Distinctive: line 87
Follow existing patterns and conventions in the codebase
- Distinctive: line 92
Keep this file updated whenever you make change significant changes for future reference.
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
.NET Repository
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
Working Effectively
Essential Build Commands
- Restore dependencies:
dotnet restore - Build the entire solution:
dotnet build - Run tests:
dnx --yes retest- Runs all unit tests across the solution
- If tests fail due to Azure Storage, run the following commands and retry:
npm install azuriteandnpx azurite &
Build Validation and CI Requirements
- Always run before committing:
dnx --yes retestdotnet format whitespace -v:diag --exclude ~/.nugetdotnet format style -v:diag --exclude ~/.nuget
Project Structure and Navigation
| Directory | Description |
src/ | Contains the repo source code. |
bin/ | Contains built packages (if any) |
Code Style and Formatting
EditorConfig Rules
The repository uses .editorconfig at the repo root for consistent code style.
- Indentation: 4 spaces for C# files, 2 spaces for XML/YAML/JSON
- Line endings: LF (Unix-style)
- Sort using directives: System.* namespaces first (
dotnet_sort_system_directives_first = true) - Type references: Prefer language keywords over framework type names (
intvsInt32) - Modern C# features: Use object/collection initializers, coalesce expressions when possible, use var when the type is apparent from the right-hand side of the assignment
- Visibility modifiers: only explicitly specify visibility when different from the default (e.g.
publicfor classes, nointernalfor classes orprivatefor fields, etc.)
Formatting Validation
- CI enforces formatting with
dotnet format whitespaceanddotnet format style - Run locally:
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget - Fix formatting:
dotnet format(without--verify-no-changes)
Testing Practices
Test Framework
- xUnit for all unit and integration tests
- Moq for mocking dependencies
- Located in
src/*.Tests/
Test Attributes
Custom xUnit attributes are sometimes used for conditional test execution:
[SecretsFact("XAI_API_KEY")]- Skips test if required secrets are missing from user secrets or environment variables[LocalFact("SECRET")]- Runs only locally (skips in CI), requires specified secrets[CIFact]- Runs only in CI environment
Dependency Management
Adding Dependencies
- Add to appropriate
.csprojfile - Run
dotnet restoreto update dependencies - Ensure version consistency across projects where applicable
CI/CD Pipeline
- Build workflow:
.github/workflows/build.yml- runs on PR and push to main/rel/feature branches - Publish workflow: Publishes to Sleet feed when
SLEET_CONNECTIONsecret is available - OS matrix: Configured in
.github/workflows/os-matrix.json(defaults to ubuntu-latest)
Special Files and Tools
dnx Command
- Purpose: built-in tool for running arbitrary dotnet tools that are published on nuget.org.
--yesauto-confirms install before run. - Example:
dnx --yes retest- runs tests with automatic retry on transient failures (retest being a tool package published at https://www.nuget.org/packages/retest) - In CI:
dnx --yes retest -- --no-build(skips build, runs tests only)
Directory.Build.rsp
- MSBuild response file with default build arguments
-nr:false- disables node reuse-m:1- single-threaded build (for stability)-v:m- minimal verbosity
Code Quality
- All PRs must pass format validation
- Tests must pass on all target frameworks
- Follow existing patterns and conventions in the codebase
Documenting Work
Project implemention details, design and key decisions should be documented in a top-level AGENTS.md file at the repo root. Keep this file updated whenever you make change significant changes for future reference.
User-facing features and APIs should be documented to highlight (not extensively, as an overview) key project features and capabilities, in the readme.md file at the repo root.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about devlooped/moq
- dotnet/runtime“Concurrent type loads in an in-memory dynamic assembly bind generic parameters to the wrong metadata rows”GitHub · Sep 19, 2026 · 2 reactions
- snapetech-org/slskNet.Runtime“Bump Moq from 4.16.1 to 4.20.72”GitHub · May 19, 2026 · 2 reactions
- Stack Overflow“C# Unit Test: Concurrent Requests with MemoryCache and SemaphoreSlim”Stack Overflow · Oct 14, 2024 · 2 votes
- chelebyy/arackiralama“deps(backend): Bump MockQueryable.EntityFrameworkCore, MockQueryable.Moq and Moq”GitHub · Oct 26, 2026 · 1 reactions
- edwardlthompson/QuickMediaIngest“Bump the nuget-dependencies group with 15 updates”GitHub · Oct 24, 2026 · 1 reactions
The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 51
Talked about on GitHub and Stack Overflow (51 times).
On GitHub · 50
- Sep 19, 2026Concurrent type loads in an in-memory dynamic assembly bind generic parameters to the wrong metadata rows — dotnet/runtime2 reactions · 7 comments
- May 19, 2026Bump Moq from 4.16.1 to 4.20.72 — snapetech-org/slskNet.Runtime2 reactions · 1 comment
- Oct 26, 2026deps(backend): Bump MockQueryable.EntityFrameworkCore, MockQueryable.Moq and Moq — chelebyy/arackiralama1 reaction · 1 comment
- Oct 24, 2026Bump the nuget-dependencies group with 15 updates — edwardlthompson/QuickMediaIngest1 reaction
- Oct 18, 2026Bump the nuget group with 24 updates — RobertVejvoda/fairspot1 reaction · 2 comments
45 more on GitHub
- Oct 17, 2026Bump Avalonia and 13 others — edwardlthompson/QuickMediaIngest1 reaction · 1 comment
- Oct 14, 2026Bump the all-dependencies group with 15 updates — emberstack/kubernetes-reflector1 reaction · 1 comment
- Oct 11, 2026Bump the nuget group with 24 updates — RobertVejvoda/fairspot1 reaction · 2 comments
- Oct 10, 2026Bump the nuget-dependencies group with 10 updates — edwardlthompson/QuickMediaIngest1 reaction · 1 comment
- Oct 5, 2026Bump Moq from 4.20.72 to 4.21.0 — KooshaPari/Dino1 reaction · 5 comments
- Oct 4, 2026Bump the nuget group with 24 updates — RobertVejvoda/fairspot1 reaction · 1 comment
- Oct 4, 2026Bump Dapr.AspNetCore and 22 others — RobertVejvoda/fairspot1 reaction · 1 comment
- Oct 3, 2026Bump the nuget-dependencies group with 10 updates — edwardlthompson/QuickMediaIngest1 reaction · 1 comment
- Sep 28, 2026Bump the dotnet group with 6 updates — davidpizon/TotallyHot-ArcRouter1 reaction
- Sep 28, 2026Bump Moq from 4.20.72 to 4.21.0 — KooshaPari/Dino1 reaction · 9 comments
- Sep 27, 2026Bump the nuget group with 23 updates — RobertVejvoda/fairspot1 reaction · 1 comment
- Dec 11, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/VTEX-SDK-dotnet1 reaction · 6 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/SmtpLw-SDK-dotnet1 reaction · 6 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/pagarme-sdk-dotnet1 reaction · 7 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/ViaCEP-SDK-dotnet1 reaction · 7 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/LatLongNet-SDK-dotnet1 reaction · 5 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/calendarific-sdk-dotnet1 reaction · 7 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/PIX-BACEN-SDK-dotnet1 reaction · 7 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/MaxiPago-SDK-dotnet1 reaction · 7 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/Sankhya-SDK-dotnet1 reaction · 6 comments
- Dec 4, 2023Bump Moq from 4.20.69 to 4.20.70 — guibranco/locaweb-servidores-sdk-dotnet1 reaction · 7 comments
- Oct 29, 2026fix: Bump Moq from 4.20.72 to 4.21.0 — factset/enterprise-sdk-utils-dotnet0 reactions · 1 comment
- Oct 28, 2026chore(deps): Bump Moq from 4.20.72 to 4.21.0 — auth0/auth0-aspnetcore-authentication0 reactions · 1 comment
- Oct 27, 2026docs-enlaces-semanal: informe del carril programado — hdcm-dev/Lab-Documentos0 reactions
- Oct 27, 2026Bump Moq from 4.20.70 to 4.21.0 — GuOrg/Gu.TwinCat0 reactions
- Oct 27, 2026Bump Moq from 4.20.72 to 4.21.0 — snapetech-org/slskNet.Runtime0 reactions
- Oct 26, 2026chore: Bump Moq from 4.20.72 to 4.21.0 — hieuck/9router-plus0 reactions · 1 comment
- Oct 26, 2026Bump Moq from 4.20.72 to 4.21.0 — mmalyska/argocd-secret-replacer0 reactions
- Oct 26, 2026chore: Bump Moq from 4.20.72 to 4.21.0 — Zikansffgj/dotnet-a2a0 reactions
- Oct 26, 2026Bump Moq from 4.20.72 to 4.21.0 — Santiago-Buffaz/ingsoft3-tp010 reactions
- Oct 25, 2026chore(deps): Bump FluentAssertions, Moq, xunit and xunit.runner.visualstudio — tointan-ux/SoftProofApp0 reactions · 1 comment
- Oct 25, 2026Bump Moq from 4.20.70 to 4.21.0 — shanmukhdatta/Vinu_Vinu0 reactions
- Oct 23, 2026chore: Bump Moq from 4.20.72 to 4.21.0 — audaciaconsulting/Audacia.Azure0 reactions · 2 comments
- Oct 22, 2026Bump Moq from 4.20.72 to 4.21.0 — microsoftgraph/msgraph-beta-sdk-dotnet0 reactions
- Oct 21, 2026Bump Moq from 4.20.72 to 4.21.0 — Geronimo2001/ingsoft30 reactions
- Oct 21, 2026Bump Moq from 4.20.72 to 4.21.0 — microsoftgraph/msgraph-sdk-dotnet0 reactions
- Oct 21, 2026Bump Moq from 4.20.72 to 4.21.0 — hjaltedaniel/Umbraco.Community.Engage.LocationHeaders0 reactions
- Oct 21, 2026Bump Moq from 4.20.72 to 4.21.0 — hjaltedaniel/Umbraco.Community.Engage.LocationHeaders0 reactions
- Oct 19, 2026Add the missing Master Resume Technologies to Front-end, Back-end and Tools — JMReynoso/MyDevPortfolio0 reactions
- Oct 19, 2026Spec: Add a DevOps category under Technologies I Use — JMReynoso/MyDevPortfolio0 reactions
- Oct 19, 2026Bump Moq from 4.20.72 to 4.21.0 — dijgrid/razor-light0 reactions
- Oct 19, 2026deps: Bump Moq from 4.20.2 to 4.21.0 — lygg6699/YLproxy0 reactions · 1 comment
- Oct 18, 2026Remove usage of Moq due to lack of maintainer trust with previous email harvesting — meziantou/Meziantou.Analyzer0 reactions
- Oct 14, 2026chore: Bump the testing group with 2 updates — marceldigital/Umbraco-Automate-ClickUpsays it tested it0 reactions
- Oct 6, 2026chore: Bump Moq from 4.20.72 to 4.21.0 — Seddryck/Expressif0 reactions · 3 comments
On Stack Overflow · 1
- Oct 14, 2024C# Unit Test: Concurrent Requests with MemoryCache and SemaphoreSlim2 votes
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

