vs-solutionpersistence
Copilot instructions213 starsChanged 8 months agoMITView on GitHub
* Review the CONTRIBUTING.md file for instructions to build and test the software. * Run the .github/Prime-ForCopilot.ps1 script (once) before running any dotnet or msbuild commands. If you see any build errors about not finding git objects or a shallow clone, it may be time to run this script again. IMPORTANT: This repository uses Microsoft.Testing.Platform (MTP v2) with xunit v3. Traditional --filter syntax does NOT work. Use the options below instead. Run all tests: Run tests for a specific test…
In this repositoryOne other file it gives its agents.
The file
We split this copilot-instructions.md into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
Run the .github/Prime-ForCopilot.ps1 script (once) before running any dotnet or msbuild commands.
- Distinctive: line 7
If you see any build errors about not finding git objects or a shallow clone, it may be time to run this script again.
- Very specific: line 12
Avoid introducing binary breaking changes in public APIs of projects under src unless their project files have IsPackable set to false.
- Very specific: line 72
Use --filter-method, --filter-class, --filter-namespace for simple filtering
- Very specific: line 73
Use --filter-trait and --filter-not-trait for trait-based filtering (replaces --filter "TestCategory=...")
- Distinctive: line 83
Add API doc comments to all new public and internal members.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 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
Copilot instructions for this repository
High level guidance
- Review the
CONTRIBUTING.mdfile for instructions to build and test the software. - Run the
.github/Prime-ForCopilot.ps1script (once) before running anydotnetormsbuildcommands. If you see any build errors about not finding git objects or a shallow clone, it may be time to run this script again.
Software Design
- Design APIs to be highly testable, and all functionality should be tested.
- Avoid introducing binary breaking changes in public APIs of projects under
srcunless their project files haveIsPackableset tofalse.
Testing
IMPORTANT: This repository uses Microsoft.Testing.Platform (MTP v2) with xunit v3. Traditional --filter syntax does NOT work. Use the options below instead.
- There should generally be one test project (under the
testdirectory) per shipping project (under thesrcdirectory). Test projects are named after the project being tested with a.Testssuffix. - Tests use xunit v3 with Microsoft.Testing.Platform (MTP v2). Traditional VSTest
--filtersyntax does NOT work. - Some tests are known to be unstable. When running tests, you should skip the unstable ones by using
-- --filter-not-trait "FailsInCloudTest=true".
Running Tests
Run all tests:
dotnet test --no-build -c ReleaseRun tests for a specific test project:
dotnet test --project test/Microsoft.VisualStudio.SolutionPersistence.Tests/Microsoft.VisualStudio.SolutionPersistence.Tests.csproj --no-build -c ReleaseRun a single test method:
dotnet test --project test/Microsoft.VisualStudio.SolutionPersistence.Tests/Microsoft.VisualStudio.SolutionPersistence.Tests.csproj --no-build -c Release -- --filter-method ClassName.MethodNameRun all tests in a test class:
dotnet test --project test/Microsoft.VisualStudio.SolutionPersistence.Tests/Microsoft.VisualStudio.SolutionPersistence.Tests.csproj --no-build -c Release -- --filter-class ClassNameRun tests with wildcard matching (supports wildcards at beginning and/or end):
dotnet test --project test/Microsoft.VisualStudio.SolutionPersistence.Tests/Microsoft.VisualStudio.SolutionPersistence.Tests.csproj --no-build -c Release -- --filter-method "*Pattern*"Run tests with a specific trait (equivalent to category filtering):
dotnet test --project test/Microsoft.VisualStudio.SolutionPersistence.Tests/Microsoft.VisualStudio.SolutionPersistence.Tests.csproj --no-build -c Release -- --filter-trait "TraitName=value"Exclude tests with a specific trait (skip unstable tests):
dotnet test --project test/Microsoft.VisualStudio.SolutionPersistence.Tests/Microsoft.VisualStudio.SolutionPersistence.Tests.csproj --no-build -c Release -- --filter-not-trait "TestCategory=FailsInCloudTest"Run tests for a specific framework only:
dotnet test --project test/Microsoft.VisualStudio.SolutionPersistence.Tests/Microsoft.VisualStudio.SolutionPersistence.Tests.csproj --no-build -c Release --framework net8.0List all available tests without running them:
cd test/Microsoft.VisualStudio.SolutionPersistence.Tests
dotnet run --no-build -c Release --framework net8.0 -- --list-testsKey points about test filtering with MTP v2 / xunit v3:
- Options after
--are passed to the test runner, not todotnet test - Use
--filter-method,--filter-class,--filter-namespacefor simple filtering - Use
--filter-traitand--filter-not-traitfor trait-based filtering (replaces--filter "TestCategory=...") - Traditional VSTest
--filterexpressions do NOT work - Wildcards
*are supported at the beginning and/or end of filter values - Multiple simple filters of the same type use OR logic, different types combine with AND
- See
--helpfor query filter language for advanced scenarios
Coding style
- Honor StyleCop rules and fix any reported build warnings after getting tests to pass.
- In C# files, use namespace statements instead of namespace blocks for all new files.
- Add API doc comments to all new public and internal members.
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.

