-
Notifications
You must be signed in to change notification settings - Fork 330
Expand file tree
/
Copy pathbuild.proj
More file actions
1022 lines (897 loc) · 46.5 KB
/
build.proj
File metadata and controls
1022 lines (897 loc) · 46.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Imports ========================================================= -->
<Import Project="src/Directory.Build.props" />
<!-- Build Parameters ================================================ -->
<!-- @TODO: Add a Help target that lists targets and these descriptions of the parameters -->
<PropertyGroup>
<!--
BuildNumber
Applies to: Build*, Pack*
Description: Number that identifies the build.
For local developer builds, this does not need to be used. The developer
should either specify an entire package version override (via
PackageVersion*, et. al.) or by omitting the package version.
For automated builds, this should always be specified instead of
a package version. Thus, the version base is controlled via source and the
build number is simply appended as a revision number.
Default value: [blank]
Example: 1234
-->
<!-- @TODO: Currently this is defaulted to 0 by Directory.Build.props, which is the same default used later on anyhow. -->
<BuildNumber Condition="'$(BuildNumber)' == ''" />
<BuildNumberArgument Condition="'$(BuildNumber)' != ''">
-p:BuildNumber=$(BuildNumber)
</BuildNumberArgument>
<!--
BuildSuffix
Aplies to: Build*, Pack*
Description: Suffix to add at the end of the package version to indicate the generated
version is a pre-release.
For local developer builds, this does not need to be set. If a specific
package version is needed, specify PackageVersionMds. Otherwise, the
generated package version will eg, 1.2.3.dev.
For automated builds, this should only be specified on pre-release builds, ie
PR/CI pipeline runs. For official, production-ready builds, omit this field
and include a BuildNumber.
Default value: [blank]
Example: prbuild
-->
<BuildSuffix Condition="'$(BuildSuffix)' == ''" />
<BuildSuffixArgument Condition="'$(BuildSuffix)' != ''">
-p:BuildSuffix=$(BuildSuffix)
</BuildSuffixArgument>
<!--
Configuration
Applies to: All targets
Description: Which build configuration to build
Default value: Debug
Allowed values: Debug, Release
-->
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<!--
DotnetPath
Applies to: All targets
Description: Path to folder containing the `dotnet` binary. Override this if a specific
version (eg, x86) is required. Otherwise, this defaults to using the dotnet
binary in the PATH variable. The provided path should end with a `\` (or `/`)
character.
Default value: [blank]
Example: C:\x86\
-->
<DotnetPath Condition="'$(DotnetPath)' == ''" />
<!--
NugetPath
Applies to: PackSqlClient
Description: Path to NuGet executable. Override if `nuget` is not included in the PATH
variable.
Default value: nuget
Example: C:\nuget\nuget.exe
-->
<NugetPath Condition="'$(NugetPath)' == ''">nuget</NugetPath>
<!--
PackBuild
Applies to: Pack*
Description: Whether the Pack* targets should buiild the project before packaging. If
true, the project will be built as part of packaging. If false, it will not.
For most developers, building immediately before packing is the norm, and
this functionality is added for convenience. However, for official builds,
binaries are signed between building and packing, so building immediately
before packing would clobber the signed binaries.
Default value: true
Allowed values: (true|false)
-->
<PackBuild Condition="'$(PackBuild)' == ''">true</PackBuild>
<PackBuildArgument Condition="'$(PackBuild.ToLower())' != 'true'">
--no-build
</PackBuildArgument>
<!--
@TODO: This is kinda hacky, ideally we can pack via dotnet pack, which will handle building,
and can thus be switched off by passing -no-build. However, we're not there because we need
to build multiple projects before packaging, and thus need to use nuget. So, until then we
will switch off dependency building dynamically building the target dependencies
-->
<PackSqlClientDependsOn Condition="'$(PackBuild.ToLower())' == 'true'">BuildSqlClient</PackSqlClientDependsOn>
<!--
PackageVersionAbstractions
Applies to: BuildAbstractions, PackAbstractions
Description: Specifies what version to assign to the Microsoft.Data.SqlClient.Extensions.Abstractions
package. If this is omitted, the assigned version will default to the version
calculated by Versions.props. If this is provided, it will override the
package version and assembly versions will be calculated based on it.
Applies to: BuildSqlClient*, PackSqlClient, TestSqlClient, TestSqlClientFunctional, TestSqlClientManual
BuildAkvProvider, PackAkvProvider
(with -p:ReferenceType=Package)
Description: Specifies what version of Microsoft.Data.SqlClient.Extensions.Abstractions
to use when compiling/packaging/testing the specified package.
Default value: [blank]
Example: 1.0.1-dev2345
-->
<PackageVersionAbstractions Condition="'$(PackageVersionAbstractions)' == ''" />
<PackageVersionAbstractionsArgument Condition="'$(PackageVersionAbstractions)' != ''">
-p:AbstractionsPackageVersion=$(PackageVersionAbstractions)
</PackageVersionAbstractionsArgument>
<!--
PackageVersionAkvProvider
Applies to: BuildAkvProvider, PackAkvProvider
Description: Specifies what version to assign to Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
when building/packing the AKV provider. If this is omitted, the assigned
version will default to the version calculated by Versions.props. If this is
provided, it will override the package version and assembly version will be
calculated based on it.
Default value: [blank]
Example: 1.0.1-dev2345
-->
<PackageVersionAkvProvider Condition="'$(PackageVersionAkvProvider)' == ''" />
<PackageVersionAkvProviderArgument Condition="'$(PackageVersionAkvProvider)' != ''">
-p:AkvProviderPackageVersion=$(PackageVersionAkvProvider)
</PackageVersionAkvProviderArgument>
<!--
PackageVersionAzure
Applies to: BuildAzure, PackAzure
Description: Specifies what version to assign to Microsoft.Data.SqlClient.Extensions.Azure
when building/packing the Azure package. If this is omitted, the assigned
version will default to the version calculated by Versions.props. If this is
provided, it will override the package version and assembly version will be
calculated based on it.
Default value: [blank]
Example: 1.0.1-dev2345
-->
<PackageVersionAzure Condition="'$(PackageVersionAzure)' == ''" />
<PackageVersionAzureArgument Condition="'$(PackageVersionAzure)' != ''">
-p:AzurePackageVersion=$(PackageVersionAbstractions)
</PackageVersionAzureArgument>
<!--
PackageVersionLogging
Applies to: BuildLogging, PackLogging
Description: Specifies what version to assign to Microsoft.Data.SqlClient.Internal.Logging
when building/packing the Logging package. If this is omitted, the assigned
version will default to the version calculated by Versions.props. If this is
provided, it will override the package version and assembly version will be
calculated based on it.
Applies to: BuildSqlClient*, PackSqlClient, TestSqlClient, TestSqlClientFunctional, TestSqlClientManual
BuildAkvProvider, PackAkvProvider
BuildAbstractions, PackAbstractions
BuildAzure, PackAzure,
(with -p:ReferenceType=Package)
Description: Specifies what version of Microsoft.Data.SqlClient.Internal.Logging
to use when compiling/packaging/testing the specified package.
Default value: [blank]
Example: 1.0.1-dev2345
-->
<PackageVersionLogging Condition="'$(PackageVersionLogging)' == ''" />
<PackageVersionLoggingArgument Condition="'$(PackageVersionLogging)' != ''">
-p:LoggingPackageVersion=$(PackageVersionLogging)
</PackageVersionLoggingArgument>
<!--
PackageVersionSqlClient
Applies to: TestSqlClient, TestSqlClientFunctional, TestSqlClientManual
BuildAkvProvider, PackAkvProvider
TestAzure
(with -p:ReferenceType=Package)
Description Specifies what version of Microsoft.Data.SqlClient to use when compiling
to use when compiling/packaging/testing the specified package.
Applies to: BuildSqlClient*, PackSqlClient
Description: Specifies what version to assign to Microsoft.Data.SqlClient when building/
packing the SqlClient package. If this is omitted, the assigned
version will default to the version calculated by Versions.props. If this is
provided, it will override the package version and assembly version will be
calculated based on it.
Default value: [blank]
Example: 7.0.0-preview4
-->
<PackageVersionSqlClient Condition="'$(PackageVersionSqlClient)' == ''" />
<PackageVersionSqlClientArgument Condition="'$(PackageVersionSqlClient)' != ''">
-p:SqlClientPackageVersion=$(PackageVersionSqlClient)
</PackageVersionSqlClientArgument>
<!--
PackageVersionSqlServer
Applies to: BuildSqlServer
Description: Specifies the package version to use for Microsoft.SqlServer.Server. If this
is specified, it will be used preferentially: assembly version and file
version will be derived from the specified package version.
Default value: [blank]
Example: 1.0.0-dev2345
-->
<PackageVersionSqlServer Condition="'$(PackageVersionSqlServer)' == ''" />
<PackageVersionSqlServerArgument Condition="'$(PackageVersionSqlServer)' != ''">
-p:SqlServerPackageVersion=$(PackageVersionSqlServer)
</PackageVersionSqlServerArgument>
<!--
ReferenceType
Applies to: BuildSqlClient, BuildSqlClientUnix, BuildSqlClientWindows
Description: Determines how to build SqlClient. If set to "Project", any cross-project
references (eg, Abstractions from SqlClient) will be made as project references. If
set to "Package", package references will be made instead. When running in
package mode, target versions can be specified via PackageVersion* build
parameters. If these are not provided, the central feed version will be used
instead (see Directory.Packages.props). When running in project mode, the
dependencies will be built automatically.
Applies to: TestSqlClientFunctional, TestSqlClientManual
Description: Determines whether to test against a project reference or a package version
of the test targets. Same description above applies.
Default value: Project
Allowed values: (Package|Project)
-->
<ReferenceType Condition="'$(ReferenceType)' == ''">Project</ReferenceType>
<ReferenceTypeArgument Condition="'$(ReferenceType.ToLower())' == 'package'">
-p:ReferenceType=Package
</ReferenceTypeArgument>
<!--
SigningKeyPath
Applies to: Build*, Pack*
Description: Path to the key to use to strong name sign binaries. If omitted, binaries
will not be strong name signed.
For Pack* targets, this only applies to a build - ie, if PackBuild is set to
false, SigningKeyPath will have no effect.
Default value: [blank]
Example: C:\path\to\my\signing\key.snk
-->
<SigningKeyPath Condition="'$(SigningKeyPath)' == ''" />
<SigningKeyPathArgument Condition="'$(SigningKeyPath)' != ''">
-p:SigningKeyPath="$(SigningKeyPath)"
</SigningKeyPathArgument>
<!--
TestBlameTimeout
Applies to: Test* targets
Description: How long to wait on a test before timing it out. This will be fed to the
dotnet blame-hang-timeout argument. If 0 is specified, hang timeout will be
disabled. For more details and supported suffixes see:
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test-vstest#options
Default value: 10m
Allowed values: (time_expression|0)
-->
<TestBlameTimeout Condition="'$(TestBlameTimeout)' == ''">10m</TestBlameTimeout>
<TestBlameArgument Condition="'$(TestBlameTimeout)' != '0'">
--blame-hang
--blame-hang-dump-type full
--blame-hang-timeout $(TestBlameTimeout)
</TestBlameArgument>
<!--
TestCodeCoverage
Applies to: Test* targets
Description: Whether code coverage data should be collected during test target execution.
Default value: true
Allowed value: (true|false)
-->
<TestCodeCoverage Condition="'$(TestCodeCoverage)' == ''">true</TestCodeCoverage>
<TestCodeCoverageArgument Condition="'$(TestCodeCoverage.ToLower())' == 'true'">
--collect "Code coverage"
--settings "$(RepoRoot)src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/CodeCoverage.runsettings"
</TestCodeCoverageArgument>
<!--
TestFilters
Applies to: Test* targets
Description: Filter to use to include or exclude any tests. If not specified, this defaults
to including all tests that are not in the category "failing", "flaky", or
"interactive". Use "none" to disable filtering and run all tests in the
target. For more information see:
https://learn.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests
Default value: category!=failing&category!=flaky&category!=interactive
Allowed values: (category_expression|none)
-->
<TestFilters Condition="'$(TestFilters)' == ''">category!=failing&category!=flaky&category!=interactive</TestFilters>
<TestFilters Condition="'$(TestFilters.ToLower())' == 'none'" />
<TestFiltersArgument Condition="'$(TestFilters)' != ''">
--filter "$(TestFilters)"
</TestFiltersArgument>
<!--
TestFramework
Applies to: Test* targets
Description: Target framework moniker for the version of .NET to use to execute the
specified test target. If not specified, this defaults to running tests for
*all* framework versions supported for the project.
Default value: [blank]
Example: net462
-->
<TestFramework Condition="'$(TestFramework)' == ''" />
<TestFrameworkArgument Condition="'$(TestFramework)' != ''">-f $(TestFramework)</TestFrameworkArgument>
<!--
TestResultsFolderPath
Applies to: Test* targets
Description: Absolute path to directory where any test results should be dumped. If not
specified, this path will default to test_results in the root of the
repository.
Default value: $(RepoRoot)\test_results
Example: C:\my_test_results\my_extra_special_test_run_folder\
-->
<TestResultsFolderPath Condition="'$(TestResultsFolderPath)' == ''">$(RepoRoot)test_results</TestResultsFolderPath>
<!--
TestSet
Applies to: TestSqlClientManual
Description: Used to select a set of tests to run from the SqlClient manual tests project. If not
specified, all tests will be executed.
Default value: [blank]
Allowed values: ([1][2][3][AE])
Examples: "1", "12", "AE", "12AE"
-->
<TestSet Condition="'$(TestSet)' == ''" />
<TestSetArgument Condition="'$(TestSet)' != ''">-p:TestSet="$(TestSet)"</TestSetArgument>
</PropertyGroup>
<!-- ================================================================= -->
<!-- Top Level/Miscellaneous Targets -->
<!--
Build: Builds all packages
Note: These have been ordered in a vague attempt to minimize multiple rebuilds of dependencies.
-->
<Target Name="Build" DependsOnTargets="BuildLogging;BuildAbstractions;BuildSqlClient;BuildAzure;BuildAkvProvider;BuildSqlServer" />
<!-- Clean: Convenience target to remove build/test output -->
<Target Name="Clean">
<!-- Remove known build output paths -->
<RemoveDir Directories="$([System.IO.Directory]::GetDirectories('.', 'artifacts', SearchOption.AllDirectories))" />
<RemoveDir Directories="$([System.IO.Directory]::GetDirectories('.', 'test_results', SearchOption.AllDirectories))" />
<!-- Remove remaining bin/intermediate paths, eg test binaries -->
<RemoveDir Directories="$([System.IO.Directory]::GetDirectories('.', 'bin', SearchOption.AllDirectories))" />
<RemoveDir Directories="$([System.IO.Directory]::GetDirectories('.', 'obj', SearchOption.AllDirectories))" />
</Target>
<!--
Pack: Packages all packages
Note: These have been ordered in a vague attempt to minimize multiple rebuilds of dependencies.
-->
<Target Name="Pack" DependsOnTargets="PackLogging;PackAbstractions;PackSqlClient;PackAzure;PackAkvProvider;PackSqlServer" />
<!--
Test: Run all test targets for all packages.
Note: This will run for a *very* long time and it is not recommended, even in automated test
environments. Please consider running project specific test targets or specific test sets
within the project.
-->
<Target Name="Test" DependsOnTargets="TestAbstractions;TestAzure;TestSqlClient" />
<!-- ================================================================= -->
<!-- Microsoft.Data.SqlClient Targets -->
<PropertyGroup>
<!-- Root for SqlClient projects -->
<SqlClientSrcRoot>$(RepoRoot)src/Microsoft.Data.SqlClient/</SqlClientSrcRoot>
<SqlClientArtifactRoot>$(RepoRoot)artifacts/Microsoft.Data.SqlClient/</SqlClientArtifactRoot>
<!-- Project Path -->
<SqlClientProjectPath>$(SqlClientSrcRoot)src/Microsoft.Data.SqlClient.csproj</SqlClientProjectPath>
<SqlClientRefProjectPath>$(SqlClientSrcRoot)ref/Microsoft.Data.SqlClient.csproj</SqlClientRefProjectPath>
<SqlClientNotSupportedProjectPath>$(SqlClientSrcRoot)notsupported/Microsoft.Data.SqlClient.csproj</SqlClientNotSupportedProjectPath>
<!-- Test Project Paths -->
<SqlClientFunctionalTestProjectPath>$(SqlClientSrcRoot)tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj</SqlClientFunctionalTestProjectPath>
<SqlClientManualTestProjectPath>$(SqlClientSrcRoot)tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj</SqlClientManualTestProjectPath>
<SqlClientUnitTestProjectPath>$(SqlClientSrcRoot)tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj</SqlClientUnitTestProjectPath>
<!-- Tools/Specs Paths -->
<SqlClientNuspecPath>$(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec</SqlClientNuspecPath>
<GenApiPath>$(RepoRoot)tools/GenAPI/Microsoft.DotNet.GenAPI/</GenApiPath>
<GenApiProjectPath>$(GenApiPath)Microsoft.DotNet.GenAPI.csproj</GenApiProjectPath>
</PropertyGroup>
<!-- Build SqlClient Targets =============================================== -->
<!-- BuildSqlClient: Builds all binaries for SqlClient -->
<Target Name="BuildSqlClient" DependsOnTargets="BuildSqlClientUnix;BuildSqlClientWindows;BuildSqlClientRef;BuildSqlClientNotSupported" />
<!--
BuildSqlClientNotSupported: Builds a version of the SqlClient assemblies that always throws
PlatformNotSupportedException. It generates the source for this using GenAPI which is built as
the first step of this target.
-->
<Target Name="BuildSqlClientNotSupported">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build "$(GenApiProjectPath)"
-p:Configuration=$(Configuration)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building GenAPI project via command: '$(DotnetCommand)'"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
<!-- Get the path to the GenAPI artifact -->
<ItemGroup>
<GenApiArtifactPath Include="$(GenApiPath)bin/$(Configuration)/**/Microsoft.DotNet.GenAPI.dll" />
</ItemGroup>
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build "$(SqlClientNotSupportedProjectPath)"
-p:Configuration=$(Configuration)
-p:GenApiPath="@(GenApiArtifactPath->'%(FullPath)')"
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionSqlClientArgument)
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building not supported binaries project via command: '$(DotnetCommand)'"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- BuildSqlClientRef: Builds the ref binaries project for SqlClient, which is OS-agnostic -->
<Target Name="BuildSqlClientRef">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build $(SqlClientRefProjectPath)
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionSqlClientArgument)
<!-- Reference type arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building SqlClient ref binaries via command: $(DotnetCommand)"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- BuildSqlClientUnix: Builds all unix-specific SqlClient binaries -->
<Target Name="BuildSqlClientUnix">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build $(SqlClientProjectPath)
-p:Configuration=$(Configuration)
-p:TargetOs=Unix
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionSqlClientArgument)
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building SqlClient for Unix via command: $(DotnetCommand)"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- BuildSqlClientWindows: Builds all windows-specific SqlClient binaries -->
<Target Name="BuildSqlClientWindows">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build $(SqlClientProjectPath)
-p:Configuration=$(Configuration)
-p:TargetOs=Windows_NT
$(SigningKeyPathArgument)
<!-- Versioning Arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionSqlClientArgument)
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building SqlClient for Windows via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- Pack SqlClient Target ===================================================== -->
<!--
PackSqlClient: Packages SqlClient binaries into a NuGet package.
Because the SqlClient package depends on the "not supported" and ref projects, we can't use dotnet to
automatically build before packaging. Instead, we rely on target dependency to handle building
the same binaries that will be packaged.
-->
<Target Name="PackSqlClient" DependsOnTargets="$(PackSqlClientDependsOn)">
<PropertyGroup>
<GitCommand>
git rev-parse HEAD
</GitCommand>
<!-- Convert more than one whitespace character into one space -->
<GitCommand>$([System.Text.RegularExpressions.Regex]::Replace($(GitCommand), "\s+", " "))</GitCommand>
</PropertyGroup>
<Message Text=">>> Fetching latest git commit hash via command: $(GitCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(GitCommand)">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitId" />
</Exec>
<!-- This is a bit hacky, and can be (@TODO:) removed once packaging is done w/o a nuspec from dotnet -->
<PropertyGroup>
<GetSqlClientPackageVersionCommand>
"$(DotnetPath)dotnet" msbuild "$(SqlClientProjectPath)"
-nologo
-verbosity:quiet
-getProperty:SqlClientPackageVersion
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionSqlClientArgument)
</GetSqlClientPackageVersionCommand>
<!-- Convert more than one whitespace character into one space -->
<GetSqlClientPackageVersionCommand>$([System.Text.RegularExpressions.Regex]::Replace($(GetSqlClientPackageVersionCommand), "\s+", " "))</GetSqlClientPackageVersionCommand>
</PropertyGroup>
<Message Text=">>> Evaluating SqlClient package version via command: $(GetSqlClientPackageVersionCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(GetSqlClientPackageVersionCommand)">
<Output TaskParameter="ConsoleOutput" PropertyName="_EvaluatedSqlClientPackageVersion" />
</Exec>
<Error Text="Failed to evaluate SqlClientPackageVersion for PackSqlClient."
Condition="'$(_EvaluatedSqlClientPackageVersion)' == ''" />
<PropertyGroup>
<_EvaluatedSqlClientPackageVersion>$([System.Text.RegularExpressions.Regex]::Replace($(_EvaluatedSqlClientPackageVersion), "\s", ""))</_EvaluatedSqlClientPackageVersion>
<CommitId>$([System.Text.RegularExpressions.Regex]::Replace($(CommitId), "\s", ""))</CommitId>
<NuGetCommand>
"$(NugetPath)" pack "$(SqlClientNuspecPath)"
-Symbols
-SymbolPackageFormat snupkg
-Version "$(_EvaluatedSqlClientPackageVersion)"
-OutputDirectory "$(SqlClientArtifactRoot)/$(ReferenceType)-$(Configuration)"
-properties "COMMITID=$(CommitId);Configuration=$(Configuration);ReferenceType=$(ReferenceType);AbstractionsPackageVersion=$(PackageVersionAbstractions);LoggingPackageVersion=$(PackageVersionLogging)"
</NuGetCommand>
<!-- Convert more than one whitespace character into one space -->
<NuGetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(NuGetCommand), "\s+", " "))</NuGetCommand>
</PropertyGroup>
<Message Text=">>> Packing SqlClient nuget via command: $(NuGetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(NuGetCommand)" />
</Target>
<!-- Test SqlClient Targets ==================================================== -->
<!-- TestSqlClient: Runs all test projects for SqlClient -->
<Target Name="TestSqlClient" DependsOnTargets="TestSqlClientFunctional;TestSqlClientManual;TestSqlClientUnit" />
<!-- TestSqlClientFunctional: Runs functional tests for SqlClient -->
<Target Name="TestSqlClientFunctional">
<!-- @TODO: Prevent from running in non-admin user mode -->
<PropertyGroup>
<LogFilePrefix>SqlClientFunctional-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>
<DotnetCommand>
"$(DotnetPath)dotnet" test "$(SqlClientFunctionalTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestCodeCoverageArgument)
$(TestFiltersArgument)
$(TestFrameworkArgument)
--results-directory "$(TestResultsFolderPath)"
--logger:"trx;LogFilePrefix=$(LogFilePrefix)"
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
$(PackageVersionSqlClientArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Running functional tests for SqlClient via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- TestSqlClientManual: Runs manual tests for SqlClient -->
<Target Name="TestSqlClientManual">
<PropertyGroup>
<LogFilePrefix>SqlClientManual-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestSet)' != ''">$(LogFilePrefix)-$(TestSet)</LogFilePrefix>
<DotnetCommand>
"$(DotnetPath)dotnet" test "$(SqlClientManualTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestCodeCoverageArgument)
$(TestFiltersArgument)
$(TestFrameworkArgument)
$(TestSetArgument)
--results-directory "$(TestResultsFolderPath)"
--logger:"trx;LogFilePrefix=$(LogFilePrefix)"
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
$(PackageVersionSqlClientArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Running manual tests for SqlClient via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- TestSqlClientUnit: Runs unit tests for SqlClient -->
<Target Name="TestSqlClientUnit">
<PropertyGroup>
<!--
Note: This test exclusively uses project references, so neither ReferenceType nor any
package version arguments are specified in this command.
-->
<LogFilePrefix>SqlClientUnit-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>
<DotnetCommand>
"$(DotnetPath)dotnet" test "$(SqlClientUnitTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestCodeCoverageArgument)
$(TestFiltersArgument)
$(TestFrameworkArgument)
--results-directory "$(TestResultsFolderPath)"
--logger:"trx;LogFilePrefix=$(LogFilePrefix)"
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Running unit tests for SqlClient via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- ================================================================= -->
<!-- Microsoft.Data.SqlClient.AlwaysEncrpyted.AzureKeyVaultProvider Targets -->
<PropertyGroup>
<AkvProviderSrcRoot>$(RepoRoot)src/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider/</AkvProviderSrcRoot>
<AkvProviderProjectPath>$(AkvProviderSrcRoot)src/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj</AkvProviderProjectPath>
</PropertyGroup>
<!-- BuildAkvProvider: Builds Microsoft.Data.SqlClient.AlwaysEncrpyted.AzureKeyVaultProvider -->
<Target Name="BuildAkvProvider">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build "$(AkvProviderProjectPath)"
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
<!--Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionAkvProviderArgument)
<!-- Reference type arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
$(PackageVersionSqlClientArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building Microsoft.Data.SqlClient.AlwaysEncrpyted.AzureKeyVaultProvider via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- PackAkvProvider: Packages Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider -->
<Target Name="PackAkvProvider">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" pack "$(AkvProviderProjectpath)"
-p:Configuration=$(Configuration)
$(PackBuildArgument)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionAkvProviderArgument)
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionAbstractionsArgument)
$(PackageVersionLoggingArgument)
$(PackageVersionSqlClientArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Packaging Microsoft.Data.SqlClient.AlwaysEncrpyted.AzureKeyVaultProvider via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- ================================================================= -->
<!-- Microsoft.Data.SqlClient.Extensions.Abstractions Targets -->
<PropertyGroup>
<AbstractionsSrcRoot>$(RepoRoot)src/Microsoft.Data.SqlClient.Extensions/Abstractions/</AbstractionsSrcRoot>
<AbstractionsProjectPath>$(AbstractionsSrcRoot)src/Abstractions.csproj</AbstractionsProjectPath>
<AbstractionsTestProjectPath>$(AbstractionsSrcRoot)test/Abstractions.Test.csproj</AbstractionsTestProjectPath>
</PropertyGroup>
<!-- BuildAbstractions: Builds Microsoft.Data.SqlClient.Extensions.Abstractions -->
<Target Name="BuildAbstractions">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build "$(AbstractionsProjectPath)"
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionAbstractionsArgument)
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building Microsoft.Data.SqlClient.Extensions.Abstractions via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- PackAbstractions: Packages Microsoft.Data.SqlClient.Extensions.Abstractions -->
<Target Name="PackAbstractions">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" pack "$(AbstractionsProjectPath)"
-p:Configuration=$(Configuration)
$(PackBuildArgument)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionAbstractionsArgument)
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Packaging Microsoft.Data.SqlClient.Extensions.Abstractions via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- TestAbstractions: Runs Microsoft.Data.SqlClient.Extensions.Abstractions.Tests -->
<Target Name="TestAbstractions">
<PropertyGroup>
<!--
Note: This test exclusively uses project references, so neither ReferenceType nor any
package version arguments are specified in this command.
-->
<LogFilePrefix>AbstractionsTests-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>
<DotnetCommand>
"$(DotnetPath)dotnet" test "$(AbstractionsTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestCodeCoverageArgument)
$(TestFiltersArgument)
$(TestFrameworkArgument)
--results-directory "$(TestResultsFolderPath)"
--logger:"trx;LogFilePrefix=$(LogFilePrefix)"
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Running tests for Abstractions via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- ================================================================= -->
<!-- Microsoft.Data.SqlClient.Extensions.Azure Targets -->
<PropertyGroup>
<AzureSrcRoot>$(RepoRoot)src/Microsoft.Data.SqlClient.Extensions/Azure/</AzureSrcRoot>
<AzureProjectPath>$(AzureSrcRoot)src/Azure.csproj</AzureProjectPath>
<AzureTestProjectPath>$(AzureSrcRoot)test/Azure.Test.csproj</AzureTestProjectPath>
</PropertyGroup>
<!-- BuildAzure: Builds Microsoft.Data.SqlClient.Extensions.Azure -->
<Target Name="BuildAzure">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build "$(AzureProjectPath)"
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionAzureArgument)
<!-- Reference type arguments -->
$(ReferenceTypeArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building Microsoft.Data.SqlClient.Extensions.Azure via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- PackAzure: Packages Microsoft.Data.SqlClient.Extensions.Azure -->
<Target Name="PackAzure">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" pack "$(AzureProjectPath)"
-p:Configuration=$(Configuration)
$(PackBuildArgument)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionAzureArgument)
<!-- Reference Type Arguments -->
$(ReferenceTypeArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Packaging Microsoft.Data.SqlClient.Extensions.Azure via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- TestAzure: Runs Microsoft.Data.SqlClient.Extensions.Azure.Tests -->
<Target Name="TestAzure">
<PropertyGroup>
<LogFilePrefix>AzureTests-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>
<DotnetCommand>
"$(DotnetPath)dotnet" test "$(AzureTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestCodeCoverageArgument)
$(TestFiltersArgument)
$(TestFrameworkArgument)
--results-directory "$(TestResultsFolderPath)"
--logger:"trx;LogFilePrefix=$(LogFilePrefix)"
<!-- Reference type arguments -->
$(ReferenceTypeArgument)
$(PackageVersionSqlClientArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Running tests for Abstractions via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- ================================================================= -->
<!-- Microsoft.Data.SqlClient.Internal.Logging Targets -->
<PropertyGroup>
<LoggingSrcRoot>$(RepoRoot)src/Microsoft.Data.SqlClient.Internal/Logging/src/</LoggingSrcRoot>
<LoggingProjectPath>$(LoggingSrcRoot)Logging.csproj</LoggingProjectPath>
</PropertyGroup>
<!-- BuildLogging: Builds Microsoft.Data.SqlClient.Internal.Logging -->
<Target Name="BuildLogging">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build $(LoggingProjectPath)
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building Microsoft.Data.SqlClient.Internal.Logging via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- PackLogging: Packages Microsoft.Data.SqlClient.Internal.Logging -->
<Target Name="PackLogging">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" pack $(LoggingProjectPath)
-p:Configuration=$(Configuration)
$(PackBuildArgument)
$(SigningKeyPathArgument)
<!-- Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionLoggingArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Packaging Microsoft.Data.SqlClient.Internal.Logging via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
<!-- ================================================================= -->
<!-- Microsoft.SqlServer.Server Targets -->
<PropertyGroup>
<SqlServerSrcRoot>$(RepoRoot)src/Microsoft.SqlServer.Server/</SqlServerSrcRoot>
<SqlServerProjectPath>$(SqlServerSrcRoot)Microsoft.SqlServer.Server.csproj</SqlServerProjectPath>
</PropertyGroup>
<!-- BuildSqlServer: Builds the Microsoft.SqlServer.Server project -->
<Target Name="BuildSqlServer">
<PropertyGroup>
<DotnetCommand>
"$(DotnetPath)dotnet" build $(SqlServerProjectPath)
-p:Configuration=$(Configuration)
$(SigningKeyPathArgument)
<!--Versioning arguments -->
$(BuildNumberArgument)
$(BuildSuffixArgument)
$(PackageVersionSqlServerArgument)
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building Microsoft.SqlServer.Server via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>