Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
8f7643b
fix: corrected compilation references to avoid attempting to compile …
JerrettDavis Dec 18, 2025
ab52754
fix: added nested directory detection to template copying logic
JerrettDavis Dec 18, 2025
4268bd4
fix: made Template copying more robust to ensure the project path is …
JerrettDavis Dec 18, 2025
ade3be2
fix: tweaked compilation includes to prevent duplicates
JerrettDavis Dec 18, 2025
02e9d2d
refactor: apply PatternKit patterns to MSBuild tasks for improved mai…
JerrettDavis Dec 19, 2025
bf9af30
feat(msbuild-sdk): add support for MSBuild.Sdk.SqlProj SQL project (#4)
JerrettDavis Dec 19, 2025
18da1af
feat(direct-connect): implemented build tasks to allow for reverse en…
JerrettDavis Dec 21, 2025
f2dbb1f
feat: add direct DACPAC reverse engineering (#8)
JerrettDavis Dec 22, 2025
3f0a287
perf: implemented a more intelligent DACPAC fingerprinting algorithm …
JerrettDavis Dec 23, 2025
c025a9f
feat: added build target for `dotnet clean`, which now removes the ge…
JerrettDavis Dec 23, 2025
95e9586
fix(build): prevent race condition during DACPAC build process (#15)
JerrettDavis Dec 24, 2025
518a7b2
feat: added the ability to split model generation across two projects…
JerrettDavis Dec 25, 2025
7b7cb49
feat: enhance configurability of the library through MSBuild and addi…
JerrettDavis Dec 26, 2025
3ce716a
docs: removed README artifacts from previous update. Updated sqlproj …
JerrettDavis Dec 26, 2025
e623f5b
Use project's RootNamespace as default for EfcptConfigRootNamespace (…
Copilot Dec 26, 2025
171aeed
feat: Auto-generate DbContext names from SQL Project, DACPAC, or conn…
Copilot Dec 26, 2025
f801649
chore: Add regeneration triggers for library version, tool version, c…
Copilot Dec 27, 2025
7e90831
chore: adding sample applications (#27)
JerrettDavis Dec 27, 2025
c16c0a8
feat: add JD.Efcpt.Sdk MSBuild SDK package and documentation (#28)
JerrettDavis Dec 28, 2025
9d39921
fix: correct VS MSBuild (#29)
JerrettDavis Dec 28, 2025
da46f6f
fix: update package paths to use build/ instead of buildTransitive/ (…
JerrettDavis Dec 28, 2025
f9478e1
fix: Fix MSBuild version detection for .NET 10 task assembly selectio…
Copilot Dec 29, 2025
2c0cb6f
chore: Improve error reporting in ResolveSqlProjAndInputs for MSBuild…
Copilot Dec 29, 2025
e769e9a
fix: Fix NullReferenceException in .sln parsing when regex groups are…
Copilot Dec 30, 2025
8d12365
fix: Add null guards for .NET Framework MSBuild compatibility (#37)
JerrettDavis Dec 30, 2025
1090c43
fix: normalize string properties to prevent NullReferenceExceptions i…
JerrettDavis Dec 30, 2025
3f4bc16
fix: enhance error handling and logging in BuildResolutionState metho…
JerrettDavis Dec 30, 2025
3da7ee2
fix: initialize assembly resolver in ModuleInitializer for .NET Frame…
JerrettDavis Dec 30, 2025
c79d994
fix: ensure proper static initialization order for regex in .NET Fram…
JerrettDavis Dec 30, 2025
bef8dbc
feat: Add SDK templates for simpler adoption - dotnet new efcptbuild …
Copilot Dec 30, 2025
282a264
fix: Fix dnx not being used for .NET 10+ target frameworks (#43)
Copilot Dec 31, 2025
a38d491
feat: enable NuGet version checking by default for SDK users (#31) (#45)
JerrettDavis Dec 31, 2025
2ef0553
chore: Add PackageType MSBuildSdk to JD.Efcpt.Sdk (#47)
Copilot Jan 1, 2026
650cbe8
refactor: consolidate schema readers and add comprehensive documentat…
JerrettDavis Jan 1, 2026
c67d227
chore: Add configurable warning levels for auto-detection and SDK ver…
Copilot Jan 2, 2026
0ded0b3
feat: Add automatic database-first SQL generation with two-project pa…
Copilot Jan 4, 2026
37ab817
fix: Add SDK version to template for Visual Studio compatibility (#55)
Copilot Jan 5, 2026
5f18796
fix: Fix template config file: remove invalid sections and experiment…
Copilot Jan 5, 2026
17b0d88
refactor: Refactor SQL project detection to prioritize SDK attribute …
Copilot Jan 5, 2026
c48a9ba
ci: Add scheduled workflow to sync efcpt-config.schema.json from upst…
Copilot Jan 5, 2026
1f494f6
chore: update efcpt-config.schema.json from upstream (#63)
github-actions[bot] Jan 5, 2026
007d0d1
chore: Add schema-based config generator for efcpt-config.json files …
Copilot Jan 5, 2026
6010cd7
docs: Implement build-time version replacement for documentation (#67)
Copilot Jan 10, 2026
3cc9bec
feat(profiling): Add optional build profiling framework with versione…
Copilot Jan 13, 2026
58d939c
Merge branch 'main' of https://github.com/JerrettDavis/JD.Efcpt.Build
JerrettDavis Jan 20, 2026
9e46b3b
feat: Convert to JD.MSBuild.Fluent with typed constants and refactore…
JerrettDavis Jan 20, 2026
5d98fd4
fix: Correct parameter types in SharedPropertyGroups and UsingTasksRe…
JerrettDavis Jan 20, 2026
de57c4f
fix: Add condition to _EfcptIsSqlProject PropertyGroup to prevent ove…
JerrettDavis Jan 20, 2026
b99b06e
fix: Add condition to _EfcptIsSqlProject PropertyGroup in source defi…
JerrettDavis Jan 20, 2026
a52b316
Merge remote-tracking branch 'origin/main' into feature/convert-to-fl…
JerrettDavis Jan 20, 2026
67faea8
refactor: apply Phase 1 DRY improvements - centralize task registry a…
JerrettDavis Jan 21, 2026
59ee7ed
docs: add Phase 1 completion summary with metrics and next steps
JerrettDavis Jan 21, 2026
c3bc46d
fix: disable JD.MSBuild.Fluent generation in CI to use pre-generated …
JerrettDavis Jan 21, 2026
b312d56
fix: explicitly set JDMSBuildFluentGenerateEnabled=false in CI
JerrettDavis Jan 21, 2026
854ad4b
chore: exclude auto-generated SQL files from samples in git
JerrettDavis Jan 21, 2026
5c0b8b7
refactor: use nameof for task registration with compile-time safety
JerrettDavis Jan 21, 2026
db5453a
fix: disable JD.MSBuild.Fluent generation to prevent file locking
JerrettDavis Jan 21, 2026
74fea10
refactor: eliminate magic strings with strongly-typed constants
JerrettDavis Jan 21, 2026
6b99428
refactor: eliminate magic strings and boilerplate with abstractions
JerrettDavis Jan 21, 2026
00a64c1
refactor: Phase 2 boilerplate reduction - 40% line elimination
JerrettDavis Jan 21, 2026
492e21b
refactor: Phase 3 - Ultimate abstraction layer (60% total reduction)
JerrettDavis Jan 21, 2026
6472c01
refactor: 80-char limit with static imports (94% compliance)
JerrettDavis Jan 21, 2026
975921a
refactor: update namespaces and eliminate deprecated constants
JerrettDavis Jan 21, 2026
990dbf6
refactor: eliminate remaining magic strings with strongly-typed const…
JerrettDavis Jan 21, 2026
0919922
fix: correct parameter name from UseConnectionStringMode to UseConnec…
JerrettDavis Jan 21, 2026
ea8f95f
fix: rename EfcptEnsureDacpac to EfcptEnsureDacpacBuilt for consistency
JerrettDavis Jan 21, 2026
8c7fc1c
fix: correct UseConnectionStringMode parameter mapping
JerrettDavis Jan 22, 2026
a85f15e
fix: update sample app to use EfcptEnsureDacpacBuilt target
JerrettDavis Jan 22, 2026
46a8c7c
fix: Replace Path_Combine with TargetList for BeforeTargets/AfterTargets
JerrettDavis Jan 22, 2026
00ac252
test: Add enterprise-grade validation tests for SQL generation targets
JerrettDavis Jan 22, 2026
bb91dde
fix: Enable SQL generation by setting EfcptEnabled in test SQL projects
JerrettDavis Jan 22, 2026
29480e5
test: Skip diagnostic test requiring SQL Server
JerrettDavis Jan 22, 2026
388c866
docs: Add comprehensive test coverage analysis and improvement plan
JerrettDavis Jan 22, 2026
f879f65
docs: Add detailed test coverage tracking checklist
JerrettDavis Jan 22, 2026
b979e71
Add DetectSqlProject tests and fix whitespace bug
JerrettDavis Jan 22, 2026
5d41150
Add ProfileAttribute tests for decorator coverage
JerrettDavis Jan 22, 2026
4e88f7f
Update test coverage tracking with Phase 1 progress
JerrettDavis Jan 22, 2026
052259a
Expand RunEfcpt tests with 10 additional scenarios
JerrettDavis Jan 22, 2026
fefbec0
Expand RunSqlPackage tests with 9 additional scenarios
JerrettDavis Jan 22, 2026
d94a908
Mark Phase 1 complete - 46 new tests, all passing
JerrettDavis Jan 22, 2026
a7e2546
Add BuildLog branch coverage tests - 11 new tests
JerrettDavis Jan 22, 2026
f4fe9e8
Phase 2: Add branch coverage tests for BuildLog and DotNetToolUtilities
JerrettDavis Jan 22, 2026
791072d
Add JsonTimeSpanConverter branch coverage tests - 7 new tests
JerrettDavis Jan 22, 2026
d9854b2
Add coverage analysis infrastructure
JerrettDavis Jan 22, 2026
2cab0fe
Fix cross-platform test failure in RunEfcptTests
JerrettDavis Jan 22, 2026
c834620
Simplify boolean comparisons and exclude test artifacts from git (#74)
Copilot Jan 22, 2026
3073179
Delete src/JD.Efcpt.Build.Definitions/CODE_REVIEW.md
JerrettDavis Jan 22, 2026
db62826
Delete src/JD.Efcpt.Build.Definitions/CODE_REVIEW_SUMMARY.md
JerrettDavis Jan 22, 2026
ceb10ab
Delete src/JD.Efcpt.Build.Definitions/ELIMINATING_MAGIC_STRINGS.md
JerrettDavis Jan 22, 2026
09e226e
Delete tests/JD.Efcpt.Build.Tests/TestResults/9534b9e5-8459-407c-9d42…
JerrettDavis Jan 22, 2026
2d1efe4
chore: add extra space back
JerrettDavis Jan 22, 2026
7dce79b
Delete PHASE_1_COMPLETE.md
JerrettDavis Jan 22, 2026
31565c4
Delete src/JD.Efcpt.Build/Definitions/Builders/ABSTRACTION_EXAMPLE.md
JerrettDavis Jan 22, 2026
b13fc71
Delete REFACTORING_PLAN.md
JerrettDavis Jan 22, 2026
3ad9e0a
Delete REFACTORING_SUMMARY.md
JerrettDavis Jan 22, 2026
aa4bc95
chore: remove tracking files
JerrettDavis Jan 22, 2026
b37e48e
chore: removed tracking file
JerrettDavis Jan 22, 2026
c3e32e5
Remove dead code from fluent API definitions
JerrettDavis Jan 23, 2026
7d7fb01
Final code review summary - document what worked and what didn't
JerrettDavis Jan 23, 2026
8ebc04d
Remove 160KB of dead code: Delete obsolete Definitions folder
JerrettDavis Jan 23, 2026
94f0038
Update cleanup documentation with Phase 2 results
JerrettDavis Jan 23, 2026
b560585
Delete CODE_REVIEW_CLEANUP.md
JerrettDavis Jan 23, 2026
50d5470
Apply performance optimizations (CA analyzers)
JerrettDavis Jan 23, 2026
5880e81
Apply CA1822: Mark methods as static where appropriate
JerrettDavis Jan 23, 2026
030b119
Fix CI build errors
JerrettDavis Jan 23, 2026
c4f2128
Skip SQL diagnostic test requiring SQL Server in CI
JerrettDavis Jan 23, 2026
a9416cd
Convert JD.Efcpt.Sdk to use JD.MSBuild.Fluent definitions
JerrettDavis Jan 24, 2026
693f39b
Fix SDK generation and update to JD.MSBuild.Fluent 1.3.12
JerrettDavis Jan 24, 2026
d01e7c7
Rename MsBuildNames to EfcptTaskNames
JerrettDavis Jan 24, 2026
61a7c26
Update SDK to use JD.MSBuild.Fluent 1.3.14 with full generation
JerrettDavis Jan 24, 2026
6bc6693
Apply Phase 1 fluent extensions from JD.MSBuild.Fluent v1.3.15
JerrettDavis Jan 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@ docs/_site
coverage.cobertura.xml
pkg/
artifacts/
*.bak
*.bak
tmpclaude-*
tests/**/TestResults/

# Auto-generated SQL files in samples
# These are generated during build and should not be tracked
samples/**/DatabaseProject/**/Tables/*.sql
samples/**/DatabaseProject/**/Views/*.sql
samples/**/DatabaseProject/**/StoredProcedures/*.sql
samples/**/DatabaseProject/**/*.sql
!samples/**/DatabaseProject/**/*.sqlproj
!samples/**/DatabaseProject/**/*.csproj
packages/
1 change: 1 addition & 0 deletions JD.Efcpt.Build.sln
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
Expand Down
8 changes: 8 additions & 0 deletions samples/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="local-packages" value="../packages" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
406 changes: 406 additions & 0 deletions samples/Samples.sln

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions samples/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:; set -eo pipefail
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
:; ${SCRIPT_DIR}/build.sh "$@"
:; exit $?

@ECHO OFF
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*
106 changes: 106 additions & 0 deletions samples/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#!/usr/bin/env pwsh
<#
.SYNOPSIS
Build script for samples solution with proper dependency management
.DESCRIPTION
This script ensures the main JD.Efcpt.Build packages are built first,
then builds the samples solution.
.PARAMETER Configuration
Build configuration (Debug or Release). Default is Debug.
.PARAMETER SkipMainBuild
Skip building the main solution packages
#>

param(
[ValidateSet('Debug', 'Release')]
[string]$Configuration = 'Debug',
[switch]$SkipMainBuild
)

$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest

$samplesRoot = $PSScriptRoot
$repoRoot = Split-Path $samplesRoot -Parent
$mainSolution = Join-Path $repoRoot "JD.Efcpt.Build.sln"
$packagesDir = Join-Path $repoRoot "packages"
$samplesSolution = Join-Path $samplesRoot "Samples.sln"

Write-Host "========================================" -ForegroundColor Cyan
Write-Host "JD.Efcpt.Build Samples Build Script" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host ""

# Step 1: Build main solution packages
if (-not $SkipMainBuild) {
Write-Host "Step 1: Building main solution..." -ForegroundColor Yellow
Push-Location $repoRoot
try {
dotnet build $mainSolution --configuration $Configuration
if ($LASTEXITCODE -ne 0) {
throw "Failed to build main solution"
}
Write-Host "✓ Main solution built successfully" -ForegroundColor Green
Write-Host ""

Write-Host "Step 2: Packing main solution..." -ForegroundColor Yellow
dotnet pack $mainSolution --configuration $Configuration --output $packagesDir --no-build
if ($LASTEXITCODE -ne 0) {
throw "Failed to pack main solution"
}
Write-Host "✓ Main solution packed successfully" -ForegroundColor Green
Write-Host ""

Write-Host "Step 3: Fixing sample project issues..." -ForegroundColor Yellow
& "$samplesRoot\fix-samples.ps1" -Quiet
Write-Host " ✓ Sample fixes applied" -ForegroundColor Green
Write-Host ""
}
finally {
Pop-Location
}
}
else {
Write-Host "Skipping main solution build" -ForegroundColor Gray
Write-Host ""
}

# Step 2: Restore and build samples solution
Write-Host "Step 4: Restoring sample solution..." -ForegroundColor Yellow
Write-Host "Note: Using NuGet.config for package sources (local packages + nuget.org)" -ForegroundColor Gray
dotnet restore $samplesSolution
$restoreExitCode = $LASTEXITCODE

if ($restoreExitCode -ne 0) {
Write-Host "⚠ Restore completed with errors" -ForegroundColor Yellow
Write-Host ""
Write-Host "Known issues:" -ForegroundColor Yellow
Write-Host " - sdk-zero-config: Requires SDK version in global.json" -ForegroundColor Gray
Write-Host " - Some samples: Target framework may not match EF Core package version" -ForegroundColor Gray
Write-Host ""
}
else {
Write-Host "✓ Sample solution restored" -ForegroundColor Green
Write-Host ""
}

Write-Host "Step 5: Building sample solution..." -ForegroundColor Yellow
dotnet build $samplesSolution --configuration $Configuration --no-restore
$buildExitCode = $LASTEXITCODE

if ($buildExitCode -ne 0) {
Write-Host "⚠ Build completed with errors" -ForegroundColor Yellow
Write-Host ""
Write-Host "Some samples may have pre-existing issues." -ForegroundColor Gray
Write-Host "Check individual sample README files for requirements." -ForegroundColor Gray
Write-Host ""
exit 1
}
else {
Write-Host "✓ Sample solution built successfully" -ForegroundColor Green
Write-Host ""
}

Write-Host "========================================" -ForegroundColor Cyan
Write-Host "Build completed! 🎉" -ForegroundColor Green
Write-Host "========================================" -ForegroundColor Cyan
67 changes: 67 additions & 0 deletions samples/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env bash

bash --version 2>&1 | head -n 1

set -eo pipefail
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)

###########################################################################
# CONFIGURATION
###########################################################################

BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj"
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"

DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
DOTNET_CHANNEL="STS"

export DOTNET_CLI_TELEMETRY_OPTOUT=1
export DOTNET_NOLOGO=1

###########################################################################
# EXECUTION
###########################################################################

function FirstJsonValue {
perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}"
}

# If dotnet CLI is installed globally and it matches requested version, use for execution
if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then
export DOTNET_EXE="$(command -v dotnet)"
else
# Download install script
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh"
mkdir -p "$TEMP_DIRECTORY"
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL"
chmod +x "$DOTNET_INSTALL_FILE"

# If global.json exists, load expected version
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")")
if [[ "$DOTNET_VERSION" == "" ]]; then
unset DOTNET_VERSION
fi
fi

# Install by channel or version
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
if [[ -z ${DOTNET_VERSION+x} ]]; then
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
else
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
fi
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
export PATH="$DOTNET_DIRECTORY:$PATH"
fi

echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"

if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
fi

"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"
30 changes: 30 additions & 0 deletions src/JD.Efcpt.Build.Definitions/BuildPropsFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using JD.MSBuild.Fluent;
using JD.MSBuild.Fluent.Fluent;
using JD.MSBuild.Fluent.Typed;

namespace JD.Efcpt.Build.Definitions;

/// <summary>
/// MSBuild package definition scaffolded from JD.Efcpt.Build.xml
/// </summary>
public static class BuildPropsFactory
{
public static PackageDefinition Create()
{
return Package.Define("JD.Efcpt.Build")
.Props(p =>
{
p.Property<EfcptIsDirectReference>("true");
p.Import("..\\buildTransitive\\JD.Efcpt.Build.props");
})
.Build();
}

// Strongly-typed property names
public readonly struct EfcptIsDirectReference : IMsBuildPropertyName
{
public string Name => "_EfcptIsDirectReference";
}
}


20 changes: 20 additions & 0 deletions src/JD.Efcpt.Build.Definitions/BuildTargetsFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using JD.MSBuild.Fluent;
using JD.MSBuild.Fluent.Fluent;

namespace JD.Efcpt.Build.Definitions;

/// <summary>
/// MSBuild package definition scaffolded from JD.Efcpt.Build.xml
/// </summary>
public static class BuildTargetsFactory
{
public static PackageDefinition Create()
{
return Package.Define("JD.Efcpt.Build")
.Targets(t =>
{
t.Import("..\\buildTransitive\\JD.Efcpt.Build.targets");
})
.Build();
}
}
Loading
Loading