Skip to content

Commit 9bbdfe1

Browse files
committed
Tired of having to have a separate editor for build.proj.
Adding AKV build target to build2.proj
1 parent b6a95fb commit 9bbdfe1

2 files changed

Lines changed: 31 additions & 4 deletions

File tree

build2.proj

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<!-- Build Parameters ============================================== -->
3+
<!-- =============================================================== -->
4+
<!-- Build Parameters -->
45
<PropertyGroup>
56
<!-- Configuration: Which build configuration to build -->
67
<!-- Allowed values: Debug, Release -->
@@ -11,13 +12,15 @@
1112
<!-- specific version (eg, x86) is required. Otherwise, this defaults to using the -->
1213
<!-- dotnet binary in the PATH variable. The provided path should end with a `\` (or -->
1314
<!-- `/`) character. Eg. C:\x86\ -->
14-
<DotnetPath Condition="'$(DotnetPath)' == ''"></DotnetPath>
15+
<DotnetPath Condition="'$(DotnetPath)' == ''" />
1516
</PropertyGroup>
1617

17-
<!-- Imports ======================================================= -->
18+
<!-- =============================================================== -->
19+
<!-- Imports -->
1820
<Import Project="src/Directory.Build.props" />
1921

20-
<!-- Microsoft.Data.SqlClient Build Targets ======================== -->
22+
<!-- =============================================================== -->
23+
<!-- Microsoft.Data.SqlClient Build Targets -->
2124
<PropertyGroup>
2225
<MdsProjectPath>$(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj</MdsProjectPath>
2326
</PropertyGroup>
@@ -54,4 +57,24 @@
5457
<Message Text=">>> Building MDS for Windows via command: $(DotnetCommand)"/>
5558
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
5659
</Target>
60+
61+
<!-- =============================================================== -->
62+
<!-- Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider targets -->
63+
<PropertyGroup>
64+
<AkvProjectPath>$(RepoRoot)src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj</AkvProjectPath>
65+
</PropertyGroup>
66+
67+
<Target Name="BuildAkv">
68+
<PropertyGroup>
69+
<DotnetCommand>
70+
$(DotnetPath)dotnet build $(AkvProjectPath)
71+
-p:Configuration=$(Configuration)
72+
</DotnetCommand>
73+
<!-- Convert more than one whitespace character into one space -->
74+
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
75+
</PropertyGroup>
76+
<Message Text=">>> Building AKV via command: $(DotnetCommand)" />
77+
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
78+
</Target>
79+
5780
</Project>

src/Microsoft.Data.SqlClient.sln

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ EndProject
213213
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Data.SqlClient", "Microsoft.Data.SqlClient\src\Microsoft.Data.SqlClient.csproj", "{9A8996A8-6484-4AA7-B50F-F861430EDE2F}"
214214
EndProject
215215
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "eng", "eng", "{4600328C-C134-499F-AAE2-964E8AD5472C}"
216+
ProjectSection(SolutionItems) = preProject
217+
..\build.proj = ..\build.proj
218+
..\build2.proj = ..\build2.proj
219+
EndProjectSection
216220
EndProject
217221
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pipelines", "pipelines", "{4CAE9195-4F1A-4D48-854C-1C9FBC512C66}"
218222
ProjectSection(SolutionItems) = preProject

0 commit comments

Comments
 (0)