Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
307 changes: 287 additions & 20 deletions build2.proj
Original file line number Diff line number Diff line change
@@ -1,29 +1,184 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description is empty and the mentioned issues (#123 about SQL Graph edge pseudo-columns and #456 about UDT buffers) appear to be unrelated to the changes in this PR, which focus on build infrastructure and packaging experiments. The PR description should be filled out to explain the purpose of this experimental build infrastructure, what problems it's trying to solve, and whether build2.proj is intended to replace or supplement build.proj.

Copilot uses AI. Check for mistakes.
<!-- Build Parameters ============================================== -->
<!-- Imports ========================================================= -->
<Import Project="src/Directory.Build.props" />

<!-- Build Parameters ================================================ -->
<PropertyGroup>
<!-- Configuration: Which build configuration to build -->
<!-- Allowed values: Debug, Release -->
<!-- Default value: Debug -->
<!--
Configuration
Copy link
Contributor

@paulmedynski paulmedynski Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation of parameters that callers may set to influence the build is great. Is there a way to have them emitted via a Help target?

dotnet build -t:Help

Just a thought if you're feeling ambitious 😄

Applies to: All targets
Description: Which build configuration to build
Default value: Debug
Allowed values: Debug, Release
-->
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure properties specified on the command line are read-only, so if someone says:

dotnet build build2.proj -p:Configuration=Blah

Then nothing in the project files can clobber that. The same goes for properties supplied via the <MSBuild> task AFAIK.

Since this is a top-level file that isn't included anywhere else, do we still need these conditions checking for empty values? It should be safe to just say this, I think?

<Configuration>Debug</Configuration>


<!-- DotnetPath: 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. Eg. C:\x86\ -->
<DotnetPath Condition="'$(DotnetPath)' == ''"></DotnetPath>
</PropertyGroup>
<!--
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)' == ''" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of defining this to be empty if it's already empty? Same for some of the properties below.


<!--
MdsPackageVersion
Applies to: TestMdsFunctional, TestMdsManual targets
Description: Specifies what version of the Microsoft.Data.SqlClient package to run tests
against. If not specified, the version defined in Versions.props is used.
This argument only has effect if the ReferenceType argument is set to
"Package".
Default value: [blank]
Example: 7.0.0-preview4
-->
<MdsPackageVersion Condition="'$(MdsPackageVersion)' == ''" />
<TestPackageBuildArgument Condition="'$(MdsPackageVersion)' != ''">
$(TestPackageBuildArgument)
-p:MdsPackageVersion=$(MdsPackageVersion)
</TestPackageBuildArgument>

<!--
ReferenceType
Applies to: TestMdsFunctional, TestMdsManual targets
Description: Determines what mode to put test runs into. If set to "Project", the test
projects will reference their test target as a ProjectReference, ie, running
against the code as-is in the repository. This will also trigger a build of
the target project, if necessary. If set to "Package", the test projects will
reference their test target as a PackageReference, ie, running against a
packaged version of the project.
Default value: Project
Allowed values: (Package|Project)
-->
<ReferenceType Condition="'$(ReferenceType)' == ''">Project</ReferenceType>
<TestPackageBuildArgument Condition="'$(ReferenceType.ToLower())' == 'package'">
$(TestPackageBuildArgument)
-p:ReferenceType=Package
</TestPackageBuildArgument>

<!--
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 suffixed 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>
<TestBlameTimeout Condition="'$(TestBlameTimeout)' == '0'" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this has any effect if TestBlameTimeout is set to 0 on the command line.

<TestBlameArgument Condition="'$(TestBlameTimeout)' != ''">
--blame-hang
--blame-hang-dump-type full
--blame-hang-timeout $(TestBlameTimeout)
</TestBlameArgument>

<!--
TestCollectCodeCoverage
Applies to: Test* targets
Description: Whether code coverage data should be collected during test target execution.
Default value: true
Allowed value: (true|false)
-->
<TestCollectCodeCoverage Condition="'$(TestCollectCodeCoverage)' == ''">true</TestCollectCodeCoverage>
<TestCollectArgument Condition="'$(TestCollectCodeCoverage.ToLower())' == 'true'">
--collect "Code coverage"
--settings "$(RepoRoot)src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/CodeCoverage.runsettings"
</TestCollectArgument>

<!--
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" or "flaky". 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add category!=interactive here.

Allowed values: (category_expression|none)
-->
<TestFilter Condition="'$(TestFilter)' == ''">category!=failing&amp;category!=flaky</TestFilter>
<TestFilter Condition="'$(TestFilter.ToLower())' == 'none'" />
<TestFilterArgument Condition="'$(TestFilter)' != ''">
--filter "$(TestFilter)"
</TestFilterArgument>

<!-- Imports ======================================================= -->
<Import Project="src/Directory.Build.props" />
<!--
TestFramework
Applies to: Test* targets
Description: Target framework moniker for the version of the .NET to use to execute the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of the .NET ?

specified test target. If not specified, this defaults to running tests for
*all* framework versions supported for the project.
Default value: [blank]
Example: net462
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can multiple monikers be speficied at once? net8.0;net9.0

-->
<TestFramework Condition="'$(TestFramework)' == ''" />
<TestFrameworkArgument Condition="'$(TestFramework)' != ''">-f $(TestFramework)</TestFrameworkArgument>

<!-- Microsoft.Data.SqlClient Build Targets ======================== -->
<!--
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: $(REPO_ROOT)\test_results
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the existing pipelines set this, and I think they expect the test results in a different directory.

Example: C:\my_test_results\my_extra_specaial_test_run_folder\
-->
<TestResultsFolderPath Condition="'$(TestResultsFolderPath)' == ''">$(RepoRoot)test_results</TestResultsFolderPath>

<!--
TestSet
Applies to: TestMdsManual target
Description: Used to select a set of tests to run from the MDS 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>

<!-- ================================================================= -->
<!-- Microsoft.Data.SqlClient Targets -->
<PropertyGroup>
<MdsProjectPath>$(RepoRoot)src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj</MdsProjectPath>
<!-- Root for MDS projects -->
<MdsRoot>$(RepoRoot)src/Microsoft.Data.SqlClient/</MdsRoot>

<!-- Tools/Specs Paths -->
<MdsNuspecPath>$(RepoRoot)tools/specs/Microsoft.Data.SqlClient.nuspec</MdsNuspecPath>

<!-- Project Paths -->
<MdsFunctionalTestProjectPath>$(MdsRoot)tests/FunctionalTests/Microsoft.Data.SqlClient.FunctionalTests.csproj</MdsFunctionalTestProjectPath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure alphabetical sorting makes the most sense here. I was expecting main project, ref project, test projects. I don't really care though.

<MdsManualTestProjectPath>$(MdsRoot)tests/ManualTests/Microsoft.Data.SqlClient.ManualTests.csproj</MdsManualTestProjectPath>
<MdsProjectPath>$(MdsRoot)src/Microsoft.Data.SqlClient.csproj</MdsProjectPath>
<MdsRefProjectPath>$(MdsRoot)ref/Microsoft.Data.SqlClient.csproj</MdsRefProjectPath>
<MdsUnitTestProjectPath>$(MdsRoot)tests/UnitTests/Microsoft.Data.SqlClient.UnitTests.csproj</MdsUnitTestProjectPath>
</PropertyGroup>

<!-- Build MDS Targets =============================================== -->
<!-- BuildMds: Builds all binaries for MDS -->
<Target Name="BuildMds" DependsOnTargets="BuildMdsUnix;BuildMdsWindows" />
<Target Name="BuildMds" DependsOnTargets="BuildMdsRef;BuildMdsUnix;BuildMdsWindows" />

<!-- BuildMdsRef: Builds the ref binaries project for MDS, which is OS-agnostic -->
<Target Name="BuildMdsRef">
<PropertyGroup>
<DotnetCommand>
$(DotnetPath)dotnet build $(MdsRefProjectPath)
-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 MDS ref binaries via command: $(DotnetCommand)"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>

<!-- BuildMdsUnix: Builds all unix-specific MDS binaries -->
<Target Name="BuildMdsUnix">
Expand All @@ -33,9 +188,10 @@
-p:Configuration=$(Configuration)
-p:TargetOs=Unix
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird indentation here, and below.

<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>

<Message Text=">>> Building MDS for Unix via command: $(DotnetCommand)"/>
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
Expand All @@ -48,10 +204,121 @@
-p:Configuration=$(Configuration)
-p:TargetOs=Windows_NT
</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
</PropertyGroup>
<Message Text=">>> Building MDS for Windows via command: $(DotnetCommand)"/>
<Message Text=">>> Building MDS for Windows via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>

<!-- Pack MDS Target ===================================================== -->
<!-- PackMds: Packages MDS binaries into a NuGet package -->
<Target Name="PackMds">
<PropertyGroup>
<GitCommand>
git rev-parse HEAD
</GitCommand>
</PropertyGroup>
<Message Text=">>> Fetching git commit hash via command: $(GitCommand)" />
<Exec Command="$(GitCommand)" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="CommitHash" />
</Exec>

<PropertyGroup>
<NugetCommand>
nuget pack &quot;$(MdsNuspecPath)&quot;
-OutputDirectory &quot;$(MdsArtifactsPath)&quot;
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property MdsArtifactsPath is referenced but never defined. It should likely be MdsArtifactsFolder instead, which is defined on line 52.

Suggested change
-OutputDirectory &quot;$(MdsArtifactsPath)&quot;
-OutputDirectory &quot;$(MdsArtifactsFolder)&quot;

Copilot uses AI. Check for mistakes.
-Version &quot;$(MdsPackageVersion)&quot;
-Properties &quot;COMMITID=$(CommitHash);Configuration=$(Configuration);&quot;
-Symbols
Comment on lines +228 to +233
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(MdsArtifactsPath) is used as the nuget pack -OutputDirectory value, but this property is not defined anywhere in this file (and doesn't come from src/Directory.Build.props). This will expand to empty and can cause nuget pack to write into an unexpected location or fail. Define MdsArtifactsPath (e.g., based on $(Artifacts) from Directory.Build.props) or use an existing property consistently.

Copilot uses AI. Check for mistakes.
Comment on lines +218 to +233
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CommitHash is captured from git rev-parse HEAD via ConsoleOutput, which typically includes a trailing newline. Passing that directly into -Properties "COMMITID=$(CommitHash)..." can result in an invalid COMMITID value (newline in the property) and potentially break nuget pack property parsing. Trim $(CommitHash) before using it (e.g., strip whitespace/newlines).

Copilot uses AI. Check for mistakes.
-SymbolPackageFormat snupkg
</NugetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable NugetCommand is assigned here but then DotnetCommand is incorrectly used in the whitespace cleanup on line 116. This should be cleaning up NugetCommand instead.

Suggested change
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
<NugetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(NugetCommand), "\s+", " "))</NugetCommand>

Copilot uses AI. Check for mistakes.
Comment on lines +232 to +237
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nuget pack invocation doesn't pass required nuspec properties. The nuspec uses tokens like $ReferenceType$, $AbstractionsPackageVersion$, and $LoggingPackageVersion$; without supplying these via -Properties, packing will fail (unresolved tokens / missing file paths). Update -Properties to include these values (or remove the tokens from the nuspec if they are no longer needed).

Suggested change
-Properties &quot;COMMITID=$(CommitHash);Configuration=$(Configuration);&quot;
-Symbols
-SymbolPackageFormat snupkg
</NugetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
-Properties &quot;COMMITID=$(CommitHash);Configuration=$(Configuration);ReferenceType=$(ReferenceType);AbstractionsPackageVersion=$(AbstractionsPackageVersion);LoggingPackageVersion=$(LoggingPackageVersion);&quot;
-Symbols
-SymbolPackageFormat snupkg
</NugetCommand>
<!-- Convert more than one whitespace character into one space -->
<NugetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(NugetCommand), "\s+", " "))</NugetCommand>

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PackMds, the whitespace-normalization step is applied to $(DotnetCommand), but the command being built/executed here is $(NugetCommand). As written, $(NugetCommand) will keep the original whitespace/newlines, and $(DotnetCommand) may be unintentionally overwritten. Apply the regex replace to $(NugetCommand) instead.

Suggested change
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
<NugetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(NugetCommand), "\s+", " "))</NugetCommand>

Copilot uses AI. Check for mistakes.
Comment on lines +228 to +237
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PackMds always passes -Version "$(MdsPackageVersion)", but MdsPackageVersion defaults to empty. nuget pack requires a non-empty version (or you should omit -Version to fall back to the nuspec <version>). Consider only adding -Version when $(MdsPackageVersion) is set, or set a sensible default.

Suggested change
<NugetCommand>
nuget pack &quot;$(MdsNuspecPath)&quot;
-OutputDirectory &quot;$(MdsArtifactsPath)&quot;
-Version &quot;$(MdsPackageVersion)&quot;
-Properties &quot;COMMITID=$(CommitHash);Configuration=$(Configuration);&quot;
-Symbols
-SymbolPackageFormat snupkg
</NugetCommand>
<!-- Convert more than one whitespace character into one space -->
<DotnetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(DotnetCommand), "\s+", " "))</DotnetCommand>
<!-- Only pass -Version when MdsPackageVersion is set -->
<VersionArgument Condition=" '$(MdsPackageVersion)' != '' ">-Version &quot;$(MdsPackageVersion)&quot;</VersionArgument>
<NugetCommand>
nuget pack &quot;$(MdsNuspecPath)&quot;
-OutputDirectory &quot;$(MdsArtifactsPath)&quot;
$(VersionArgument)
-Properties &quot;COMMITID=$(CommitHash);Configuration=$(Configuration);&quot;
-Symbols
-SymbolPackageFormat snupkg
</NugetCommand>
<!-- Convert more than one whitespace character into one space -->
<NugetCommand>$([System.Text.RegularExpressions.Regex]::Replace($(NugetCommand), "\s+", " "))</NugetCommand>

Copilot uses AI. Check for mistakes.
</PropertyGroup>
<Message Text=">>> Packageing MDS via command: $(NugetCommand)" />
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in "Packageing" should be "Packaging".

Suggested change
<Message Text=">>> Packageing MDS via command: $(NugetCommand)" />
<Message Text=">>> Packaging MDS via command: $(NugetCommand)" />

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in the message text: "Packageing" should be "Packaging".

Suggested change
<Message Text=">>> Packageing MDS via command: $(NugetCommand)" />
<Message Text=">>> Packaging MDS via command: $(NugetCommand)" />

Copilot uses AI. Check for mistakes.
<Exec ConsoleToMsBuild="true" Command="$(NugetCommand)" />
</Target>

<!-- Test MDS Targets ==================================================== -->
<!-- TestMds: Runs all test projects for MDS -->
<Target Name="TestMds" DependsOnTargets="TestMdsFunctional;TestMdsManual;TestMdsUnit" />

<!-- TestMdsFunctional: Runs functional tests for MDS -->
<Target Name="TestMdsFunctional">
<!-- @TODO: Prevent from running in non-admin user mode -->
<PropertyGroup>
<LogFilePrefix>MdsFunctional-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>

<DotnetCommand>
$(DotnetPath)dotnet test "$(MdsFunctionalTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestCollectArgument)
$(TestFilterArgument)
$(TestFrameworkArgument)
$(TestPackageReferenceArgument)
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(TestPackageReferenceArgument) is referenced in the functional test command, but this property is never defined (the file defines TestPackageBuildArgument). As a result, ReferenceType=Package / MdsPackageVersion won't be forwarded to the test build. Use the defined property name consistently (or define TestPackageReferenceArgument).

Suggested change
$(TestPackageReferenceArgument)
$(TestPackageBuildArgument)

Copilot uses AI. Check for mistakes.
--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 functional tests for MDS via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>

<!-- TestMdsManual: Runs manual tests for MDS -->
<Target Name="TestMdsManual">
<PropertyGroup>
<LogFilePrefix>MdsManual-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestSet)' != ''">$(LogFilePrefix)-$(TestSet)</LogFilePrefix>

<DotnetCommand>
$(DotnetPath)dotnet test "$(MdsManualTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestFilterArgument)
$(TestFrameworkArgument)
$(TestPackageReferenceArgument)
$(TestSetArgument)
--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 manual tests for MDS via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>

<!-- TestMdsUnit: Runs unit tests for MDS -->
<Target Name="TestMdsUnit">
<PropertyGroup>
<!--
Note: This test exclusively uses project references, so neither ReferenceType nor any
package version arguments are not specified in this command.
-->
<LogFilePrefix>MdsUnit-$(OS)</LogFilePrefix>
<LogFilePrefix Condition="'$(TestFramework)' != ''">$(LogFilePrefix)-$(TestFramework)</LogFilePrefix>

<DotnetCommand>
$(DotnetPath)dotnet test "$(MdsUnitTestProjectPath)"
-p:Configuration=$(Configuration)
$(TestBlameArgument)
$(TestCollectArgument)
$(TestFilterArgument)
$(TestFrameworkArgument)
--results-directory "$(TestResultsFolderPath)"
--logger:"trx;LogFilePrefix=$(LogFilePrefix)
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unit test dotnet test command has an unterminated --logger: argument (missing the closing quote) and likely a missing closing )/quote at the end of the command block. This will cause the dotnet test invocation to fail when the target runs.

Suggested change
--logger:"trx;LogFilePrefix=$(LogFilePrefix)
--logger:"trx;LogFilePrefix=$(LogFilePrefix)"

Copilot uses AI. Check for mistakes.
</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 MDS via command: $(DotnetCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(DotnetCommand)" />
</Target>
</Project>
Loading