This sample demonstrates the true zero-configuration approach with JD.Efcpt.Build using Microsoft's official SQL SDK.
- Zero Configuration: No
efcpt-config.json, no templates, no explicit MSBuild references to the SQL project - Auto-Discovery: JD.Efcpt.Build automatically discovers the SQL project in the solution
- Microsoft.Build.Sql: Uses Microsoft's official SDK-style SQL project format
ZeroConfigMsBuildSql.sln
├── DatabaseProject/ # Microsoft.Build.Sql SQL project
│ ├── DatabaseProject.csproj # Uses Microsoft.Build.Sql SDK
│ └── dbo/Tables/
│ ├── Author.sql
│ ├── Blog.sql
│ └── Post.sql
└── EntityFrameworkCoreProject/
└── EntityFrameworkCoreProject.csproj # Only JD.Efcpt.Build + EF Core
Notice how minimal the configuration is:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JD.Efcpt.Build" Version="*" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.11" />
</ItemGroup>
</Project>That's it! No explicit configuration properties. JD.Efcpt.Build:
- Enables automatically (default:
EfcptEnabled=true) - Discovers the SQL project in the solution
- Generates EF Core models during build
dotnet build ZeroConfigMsBuildSql.slnGenerated files appear in EntityFrameworkCoreProject/obj/efcpt/Generated/.
Microsoft.Build.Sql is Microsoft's official SDK-style SQL project format:
- Cross-platform (works on Windows, Linux, macOS)
- Modern SDK-style project format
- Active development by Microsoft
- Works with Azure Data Studio and VS Code