Skip to content

Commit a2a9808

Browse files
authored
feat(msbuild-sdk): add support for MSBuild.Sdk.SqlProj SQL project (#4)
1 parent 965825a commit a2a9808

30 files changed

Lines changed: 1520 additions & 39 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="MSBuild.Sdk.SqlProj/3.3.0">
3+
<PropertyGroup>
4+
<Name>DatabaseProject</Name>
5+
<TargetFramework>netstandard2.1</TargetFramework>
6+
<SqlServerVersion>Sql160</SqlServerVersion>
7+
<RunSqlCodeAnalysis>True</RunSqlCodeAnalysis>
8+
9+
</PropertyGroup>
10+
11+
</Project>

samples/simple-generation/DatabaseProject/DatabaseProject/README.md renamed to samples/msbuild-sdk-sql-proj-generation/DatabaseProject/README.md

File renamed without changes.

samples/simple-generation/DatabaseProject/DatabaseProject/dbo/Users.sql renamed to samples/msbuild-sdk-sql-proj-generation/DatabaseProject/dbo/Users.sql

File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net10.0</TargetFramework>
4+
<LangVersion>latest</LangVersion>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<!-- Enable Efcpt generation -->
11+
<EfcptEnabled>true</EfcptEnabled>
12+
<EfcptLogVerbosity>detailed</EfcptLogVerbosity>
13+
<EfcptDumpResolvedInputs>true</EfcptDumpResolvedInputs>
14+
</PropertyGroup>
15+
16+
<ItemGroup>
17+
<!-- Reference the Database Project -->
18+
<ProjectReference Include="..\DatabaseProject\DatabaseProject.sqlproj">
19+
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
20+
<OutputItemType>None</OutputItemType>
21+
</ProjectReference>
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<!-- NuGet package reference - demonstrates real-world consumption -->
26+
<PackageReference Include="JD.Efcpt.Build" Version="*" />
27+
28+
<!-- EF Core dependencies -->
29+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
30+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.1">
31+
<PrivateAssets>all</PrivateAssets>
32+
</PackageReference>
33+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.1" />
34+
</ItemGroup>
35+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
namespace EntityFrameworkCoreProject;
2+
3+
public partial class SampleDbContext;

0 commit comments

Comments
 (0)