agentleFS
ErikEJErikEJ/EFCorePowerTools/.github/copilot-instructions.md

EFCorePowerTools

Copilot instructions2.5k starsChanged 19 months agoMITView on GitHub

EF Core Power Tools is a comprehensive toolkit for Entity Framework Core development consisting of a Visual Studio extension (VSIX), command-line tools (CLI), and supporting libraries. It enables reverse engineering of databases into EF Core models, provides data visualization tools, and includes advanced scaffolding capabilities. 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.

Trending

More talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 3 mentionsFeb 2026: 2 mentionsMar 2026: 4 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the ErikEJ/EFCorePowerTools repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about ErikEJ/EFCorePowerTools

The biggest 5 of 44 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 44

Talked about on GitHub and Stack Overflow (44 times).

On GitHub · 30

25 more on GitHub

On Stack Overflow · 14

9 more on Stack Overflow
  • 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,336 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.

The file

We split this copilot-instructions.md into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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
  1. Distinctive:

    Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does …

    line 5
  2. Distinctive:

    All EF Core 8 and CLI tools work perfectly with .NET 8.0 SDK

    line 13
  3. Distinctive:

    ALWAYS test CLI functionality: after making changes:

    line 41
  4. Very specific:

    Create test directory: mkdir /tmp/efcpt_test && cd /tmp/efcpt_test

    line 43
  5. Very specific:

    Test with sample dacpac: Copy from test/ScaffoldingTester/Chinook/obj/Debug/netstandard2.1/ErikEJ.Dacpac.Chinook.dacpac

    line 44
  6. Very specific:

    Verify: Generated models in Models/ directory and config file efcpt-config.json

    line 46
  7. Very specific:

    Test config modification: Edit efcpt-config.json, change "use-data-annotations": true, re-run

    line 47
  8. Distinctive:

    Verify: Data annotations added to generated classes

    line 48
  9. Distinctive:

    Verify output: Check Models directory, configuration file, readme

    line 64
  10. Distinctive:

    Verify changes reflected in generated code

    line 69
  11. Distinctive:

    Always use NEVER CANCEL warnings and appropriate timeout values

    line 142
  12. Distinctive:

    Always validate end-to-end scenarios: build → install → test → verify output

    line 145

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

EF Core Power Tools

EF Core Power Tools is a comprehensive toolkit for Entity Framework Core development consisting of a Visual Studio extension (VSIX), command-line tools (CLI), and supporting libraries. It enables reverse engineering of databases into EF Core models, provides data visualization tools, and includes advanced scaffolding capabilities.

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

Prerequisites and Setup

  • CRITICAL: This repository requires .NET 10.0 SDK preview for full functionality, but core components work with .NET 8.0 SDK
  • For development with .NET 8.0 SDK only: {"sdk": {"version": "8.0.119", "allowPrerelease": false, "rollForward": "latestFeature"}}
  • Projects requiring .NET 10: RevEng.Core.100, efreveng100, efcpt.10, efpt100.core (will fail with .NET 8 SDK)
  • All EF Core 8 and CLI tools work perfectly with .NET 8.0 SDK

Build and Test the Repository

  • Navigate to repository root: cd /home/runner/work/EFCorePowerTools/EFCorePowerTools
  • Building core CLI tools (EF Core 8):
    • cd src/Core/efcpt.8 && dotnet build -- takes 15-20 seconds from clean. NEVER CANCEL. Set timeout to 60+ seconds.
    • cd src/Core/efreveng80 && dotnet build -- takes 10-15 seconds from clean. NEVER CANCEL. Set timeout to 60+ seconds.
  • Running tests:
    • cd src/Core/NUnitTestCore && dotnet test -- takes 20-25 seconds. NEVER CANCEL. Set timeout to 120+ seconds.
    • Tests: 74 passed, 3 skipped (normal behavior)
  • Building dacpac projects:
    • cd test/ScaffoldingTester/Chinook && dotnet build -- takes 7-10 seconds. NEVER CANCEL. Set timeout to 60+ seconds.

CLI Tool Installation and Usage

  • Install globally: dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 8.*
  • Update globally: dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*
  • Basic usage: efcpt --help (takes 1-2 seconds to run)
  • Test with dacpac: efcpt path/to/file.dacpac mssql (takes 3-5 seconds for typical database)

Visual Studio Extension (VSIX)

  • The main solution src/EFCorePowerTools.slnx builds the VSIX but requires Windows and Visual Studio build tools
  • CRITICAL: VSIX building requires Windows environment with MSBuild and Visual Studio SDK
  • On Linux: Can build core components but not the full VSIX package
  • Build workflow uses specific CMD scripts in src/Core/efreveng*/BuildCmdlineTool.cmd

Validation

Essential Validation Scenarios

  • ALWAYS test CLI functionality after making changes:
    1. Install/update CLI tool globally: dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*
    2. Create test directory: mkdir /tmp/efcpt_test && cd /tmp/efcpt_test
    3. Test with sample dacpac: Copy from test/ScaffoldingTester/Chinook/obj/Debug/netstandard2.1/ErikEJ.Dacpac.Chinook.dacpac
    4. Run: efcpt ErikEJ.Dacpac.Chinook.dacpac mssql
    5. Verify: Generated models in Models/ directory and config file efcpt-config.json
    6. Test config modification: Edit efcpt-config.json, change "use-data-annotations": true, re-run
    7. Verify: Data annotations added to generated classes
  • ALWAYS run core tests to ensure no regressions:
    • cd src/Core/NUnitTestCore && dotnet test -- NEVER CANCEL, wait 2+ minutes
  • Build validation timing expectations:
    • Clean CLI build: 15-20 seconds
    • Incremental CLI build: 3-5 seconds
    • Test suite: 20-25 seconds
    • Dacpac build: 7-10 seconds
    • CLI tool execution: 3-5 seconds

Manual Testing Workflows

  1. Reverse Engineering Workflow:
    • Build dacpac: cd test/ScaffoldingTester/Chinook && dotnet build
    • Test CLI: efcpt path/to/dacpac.dacpac mssql
    • Verify output: Check Models directory, configuration file, readme
  2. Configuration Testing:
    • Modify efcpt-config.json settings (data annotations, namespaces, etc.)
    • Re-run CLI command
    • Verify changes reflected in generated code
  3. Build System Validation:
    • Clean build test: dotnet clean && dotnet build
    • Dependency verification: Check all referenced packages restore correctly

Common Tasks

Frequently Used Commands

# Core development workflow
cd /home/runner/work/EFCorePowerTools/EFCorePowerTools

# Build CLI 8 tool
cd src/Core/efcpt.8 && dotnet build

# Run tests  
cd src/Core/NUnitTestCore && dotnet test

# Build test dacpac
cd test/ScaffoldingTester/Chinook && dotnet build

# Install/update CLI globally
dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*

# Test CLI with dacpac
cd /tmp && mkdir test_efcpt && cd test_efcpt
cp /home/runner/work/EFCorePowerTools/EFCorePowerTools/test/ScaffoldingTester/Chinook/obj/Debug/netstandard2.1/ErikEJ.Dacpac.Chinook.dacpac .
efcpt ErikEJ.Dacpac.Chinook.dacpac mssql

Repository Structure Overview

src/
├── Core/                    # Core reverse engineering libraries and CLI tools
│   ├── efcpt.8/            # CLI tool for EF Core 8 (builds with .NET 8 SDK)
│   ├── efreveng80/         # Reverse engineering tool for EF Core 8  
│   ├── RevEng.Core.80/     # Core reverse engineering library for EF Core 8
│   ├── efcpt.10/           # CLI tool for EF Core 10 (requires .NET 10 SDK)
│   └── NUnitTestCore/      # Core test suite (74 tests)
├── GUI/                     # Visual Studio extension components
│   ├── EFCorePowerTools/   # Main VSIX project (Windows/VS only)
│   └── Shared/             # Shared GUI components
└── Nupkg/                  # NuGet packages

test/
├── ScaffoldingTester/      # Test applications and sample databases
│   └── Chinook/            # Sample dacpac for testing

samples/                    # Configuration examples and schemas
├── efcpt-config.json       # Complete sample configuration
└── efcpt-config.schema.json # JSON schema

Common Configuration Files

  • global.json: SDK version requirements
  • src/Directory.Build.props: MSBuild common properties, analyzers, code style
  • src/EFCorePowerTools.slnx: Main solution (includes VSIX projects)
  • samples/efcpt-config.json: Complete CLI configuration example
  • .editorconfig: Code style and formatting rules

Development Workflow Timing

OperationExpected TimeTimeout Setting
CLI build (clean)15-20s60s
CLI build (incremental)3-5s30s
Test suite20-25s120s
Dacpac build7-10s60s
CLI execution3-5s30s
Tool install/update10-15s60s

CRITICAL REMINDERS:

  • NEVER CANCEL builds or tests - they may appear to hang but are working
  • Always use NEVER CANCEL warnings and appropriate timeout values
  • EF Core 10 projects require .NET 10 SDK - modify global.json if needed
  • CLI tools are the primary way to test functionality outside Visual Studio
  • Always validate end-to-end scenarios: build → install → test → verify output

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.