Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f6bbbaf
User Story 37654: Create Abstractions package
paulmedynski Jul 8, 2025
a530c48
Merge branch 'feat/azure-split' into dev/paul/azure-split/abstractions
paulmedynski Sep 15, 2025
a9aaf95
User Story 37654: Create Abstractions package
paulmedynski Sep 15, 2025
1fc50c9
User Story 37654: Create Abstractions package
paulmedynski Sep 15, 2025
1b1ddec
Optimization: Use Environment.TickCount for SqlStatistics execution t…
SAY14489 Sep 16, 2025
780db73
[7.0.0-preview1] Prepare release notes (#3616)
paulmedynski Sep 16, 2025
1765de5
Merge | TdsParser functional changes (#3555)
edwardneal Sep 16, 2025
6b0c5c2
Fix Debug Assertion in Connection Pool Due to Double Deactivation (#3…
ShreyaLaxminarayan Sep 17, 2025
5d136ea
User Story 37654: Create Abstractions package
paulmedynski Sep 17, 2025
beaf9c3
User Story 37654: Create Abstractions package
paulmedynski Sep 17, 2025
66cd309
User Story 37654: Create Abstractions package
paulmedynski Sep 17, 2025
e472245
Merge | SqlCommand Public Properties (#3611)
benrr101 Sep 17, 2025
994cf81
User Story 37654: Create Abstractions package
paulmedynski Sep 18, 2025
960a6c4
User Story 37654: Create Abstractions package
paulmedynski Sep 18, 2025
dd39ffa
User Story 37654: Create Abstractions package
paulmedynski Sep 18, 2025
11a5e70
User Story 37654: Create Abstractions package
paulmedynski Sep 18, 2025
865cfce
User Story 37654: Create Abstractions package
paulmedynski Sep 18, 2025
2655083
Tests | Expand UDT serialization code coverage (#3423)
edwardneal Sep 18, 2025
600803b
User Story 37654: Create Abstractions package
paulmedynski Sep 18, 2025
327df5e
User Story 37654: Create Abstractions package
paulmedynski Sep 19, 2025
6dcb0db
User Story 37654: Create Abstractions package
paulmedynski Sep 19, 2025
88e95d5
User Story 37654: Create Abstractions package
paulmedynski Sep 19, 2025
5885cf8
User Story 37654: Create Abstractions package
paulmedynski Sep 20, 2025
168755c
User Story 37654: Create Abstractions package
paulmedynski Sep 22, 2025
a18bb4f
User Story 37654: Create Abstractions package
paulmedynski Sep 22, 2025
ddd0ee4
User Story 37654: Create Abstractions package
paulmedynski Sep 22, 2025
307430a
User Story 37654: Create Abstractions package
paulmedynski Sep 22, 2025
aa73678
User Story 37654: Create Abstractions package
paulmedynski Sep 22, 2025
5a35468
User Story 37654: Create Abstractions package
paulmedynski Sep 22, 2025
9f49ffe
User Story 37654: Create Abstractions package
paulmedynski Jul 8, 2025
1b4ee9d
Merge branch 'dev/paul/azure-split/abstractions' of github.com:dotnet…
paulmedynski Sep 22, 2025
50c52c1
User Story 37654: Create Abstractions package
paulmedynski Sep 23, 2025
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ indent_size = 2
indent_size = 2

# Xml files
[*.{xml,stylecop,resx,ruleset}]
[*.{xml,stylecop,resx,ruleset,slnx}]
indent_size = 2

# Xml config files
Expand Down
87 changes: 43 additions & 44 deletions BUILDGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,47 @@ Once the environment is setup properly, execute the desired set of commands belo

### Targets

The following build targets are defined in `build.proj`:

|Target|Description|
|-|-|
|`BuildAllConfigurations`|Default target. Builds the .NET Framework and .NET drivers for all target frameworks and operating systems.|
|`BuildAbstractionsPackage`|Restore, build, and pack the Abstractions package, publishing the resulting NuGet into `packages/`.|
|`BuildNetCore`|Builds the .NET driver for all target frameworks.|
|`BuildNetCoreAllOS`|Builds the .NET driver for all target frameworks and operating systems.|
|`BuildNetFx`|Builds the .NET Framework driver for all target frameworks.|
|`BuildTestsNetCore`|Builds tests for the .NET driver.|
|`BuildTestsNetFx`|Builds tests for the .NET Framework driver.|
|`Clean`|Cleans generated files.|
|`Restore`|Restores Nuget packages.|
|`Clean`|Cleans generated files, except for NuGet packages published to `packages/`.|
|`CleanAll`|Cleans all generated files.|
|`Restore`|Restores NuGet packages.|
|`RunTests`|Runs the unit, functional, and manual tests for the .NET Framework and .NET drivers|
|`RunUnitTests`|Runs just the unit tests for the .NET Framework and .NET drivers|
|`RunFunctionalTests`|Runs just the functional tests for the .NET Framework and .NET drivers|
|`RunManualTests`|Runs just the manual tests for the .NET Framework and .NET drivers|
|`BuildAkv`|Builds the Azure Key Vault Provider package for all supported platforms.|


### Parameters

The following parameters may be defined as MSBuild properties to configure the
build:

|Name|Supported Values|Default|Description|
|-|-|-|-|
|`Configuration`|`Debug`, `Release`|`Debug`|Sets the release configuration.|
|`BuildNetFx`|`true`, `false`|`true` (Windows), `false` (other)|If false, skips building the .NET Framework driver on Windows.|
|`OSGroup`|`Unix`, `Windows_NT`, `AnyOS`|typically defaults to the client system's OS, unless using `BuildAllConfigurations` or an `AnyOS` specific target|The operating system to target.|
|`Platform`|`AnyCPU`, `x86`, `x64`, `ARM`, `ARM64`|`AnyCPU`|May only be set when using package reference type or running tests.|
|`TestSet`|`1`, `2`, `3`, `AE`|all|Build or run a subset of the manual tests. Omit (default) to target all tests.|
|`DotnetPath`|Absolute file path to an installed `dotnet` version.|The system default specified by the path variable|Set to run tests using a specific dotnet version (e.g. C:\net6-win-x86\)|
|`TF`|`net8.0`, `net462`, `net47`, `net471`, `net472`, `net48`, `net481`|`net8.0` in netcore, `net462` in netfx|Sets the target framework when building or running tests. Not applicable when building the drivers.|
|`ResultsDirectory`|An absolute file path|./TestResults relative to current directory|Specifies where to write test results.|


## Example Workflows using MSBuild (Recommended)

Using the default configuration and running all tests:

```bash
msbuild -t:BuildAbstractionsPackage
msbuild
msbuild -t:BuildTestsNetFx -p:TF=net462
msbuild -t:BuildTestsNetCore
Expand All @@ -59,28 +66,31 @@ msbuild -t:RunTests
Using the Release configuration:

```bash
msbuild -p:configuration=Release
msbuild -t:BuildTestsNetFx -p:TF=net462 -p:configuration=Release
msbuild -t:BuildTestsNetCore -p:configuration=Release
msbuild -t:RunTests -p:configuration=Release
msbuild -t:BuildAbstractionsPackage -p:Configuration=Release
msbuild -p:Configuration=Release
msbuild -t:BuildTestsNetFx -p:TF=net462 -p:Configuration=Release
msbuild -t:BuildTestsNetCore -p:Configuration=Release
msbuild -t:RunTests -p:Configuration=Release
```

Running only the unit tests:

```bash
msbuild -t:BuildAbstractionsPackage
msbuild
msbuild -t:BuildTestsNetFx -p:TF=net462
msbuild -t:BuildTestsNetCore
msbuild -t:RunUnitTests
```

Using a specific dotnet version/architecture:
Using a specific .NET runtime to run tests:

```bash
msbuild -p:configuration=Release
msbuild -t:BuildTestsNetFx -p:TF=net462 -p:configuration=Release
msbuild -t:BuildTestsNetCore -p:configuration=Release
msbuild -t:RunTests -p:configuration=Release -p:DotnetPath=C:\net8-win-x86\
msbuild -t:BuildAbstractionsPackage
msbuild
msbuild -t:BuildTestsNetFx -p:TF=net462
msbuild -t:BuildTestsNetCore
msbuild -t:RunTests -p:DotnetPath=C:\net8-win-x86\
```

### Running Manual Tests
Expand Down Expand Up @@ -119,15 +129,13 @@ Manual Tests require the below setup to run:
|IsManagedInstance | (Optional) When set to `true` **TVP** related tests will use on non-Azure bs files to compare test results. this is needed when testing against Managed Instances or TVP Tests will fail on Test set 3. The default value is `false`. |
|PowerShellPath | The full path to PowerShell.exe. This is not required if the path is present in the PATH environment variable. | `D:\\escaped\\absolute\\path\\to\\PowerShell.exe` |


## Example workflows using the Dotnet SDK

#### Run Functional Tests
### Run Functional Tests

- Windows (`netfx x86`):

```bash
msbuild
dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="x86" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests"
```

Expand All @@ -152,7 +160,8 @@ dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.S
```bash
dotnet test "src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"
```
#### Run Manual Tests

### Run Manual Tests

- Windows (`netfx x86`):

Expand Down Expand Up @@ -194,35 +203,40 @@ dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlCl

Tests can be built and run with custom "Reference Type" property that enables different styles of testing:

- "Project" => Build and run tests with Microsoft.Data.SqlClient as Project Reference
- "Package" => Build and run tests with Microsoft.Data.SqlClient as Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.
- "Project" => Build and run tests with Microsoft.Data.SqlClient as a Project Reference
- "Package" => Build and run tests with Microsoft.Data.SqlClient as a Package Reference with configured "TestMicrosoftDataSqlClientVersion" in "Versions.props" file.

> ************** IMPORTANT NOTE BEFORE PROCEEDING WITH "PACKAGE" REFERENCE TYPE ***************
> CREATE A NUGET PACKAGE WITH BELOW COMMAND AND ADD TO LOCAL FOLDER + UPDATE NUGET CONFIG FILE TO READ FROM THAT LOCATION
>
> ```bash
> msbuild -p:configuration=Release
> msbuild -t:BuildAbstractionsPackage -p:Configuration=Release
> msbuild -p:Configuration=Release
> ```

A non-AnyCPU platform reference can only be used with package reference type. Otherwise, the specified platform will be replaced with AnyCPU in the build process.

### Building Tests with Reference Type

For .NET, all 4 reference types are supported:
For .NET:

```bash
# Project is the default reference type. The below commands are equivalent:
msbuild -t:BuildTestsNetCore
msbuild -t:BuildTestsNetCore -p:ReferenceType=Project
# Default setting uses Project Reference.

# Package reference type:
msbuild -t:BuildTestsNetCore -p:ReferenceType=Package
```

For .NET Framework, below reference types are supported:
For .NET Framework:

```bash
# Project is the default reference type. The below commands are equivalent:
msbuild -t:BuildTestsNetFx -p:TF=net462
msbuild -t:BuildTestsNetFx -p:TF=net462 -p:ReferenceType=Project
# Default setting uses Project Reference.

# Package reference type:
msbuild -t:BuildTestsNetFx -p:TF=net462 -p:ReferenceType=Package
```

Expand All @@ -241,26 +255,25 @@ Tests can be built and run with custom Target Frameworks. See the below examples
### Building Tests with custom target framework

```bash
msbuild -t:BuildTestsNetFx -p:TF=net462
# Build the tests for custom .NET Framework target
msbuild -t:BuildTestsNetFx -p:TF=net462
```

```bash
msbuild -t:BuildTestsNetCore -p:TF=net8.0
# Build the tests for custom .NET target
msbuild -t:BuildTestsNetCore -p:TF=net8.0
```

### Running Tests with custom target framework (traditional)

```bash
# Run tests with custom .NET Framework target
dotnet test -p:TargetNetFxVersion=net462 ...
# Use above property to run Functional Tests with custom .NET Framework target

# Run tests with custom .NET target
dotnet test -p:TargetNetCoreVersion=net8.0 ...
# Use above property to run Functional Tests with custom .NET target
```


## Using Managed SNI on Windows

Managed SNI can be enabled on Windows by enabling the below AppContext switch:
Expand All @@ -285,20 +298,6 @@ When connecting to a server, if a protocol lower than TLS 1.2 is negotiated, a s

`Switch.Microsoft.Data.SqlClient.SuppressInsecureTLSWarning`

### Troubleshooting Docker issues

There may be times where connection cannot be made to SQL Server, we found below ideas helpful:

- Clear Docker images to create clean image from time-to-time, and clear docker cache if needed by running `docker system prune` in Command Prompt.

- If you face `Microsoft.Data.SqlClient.SNI.dll not found` errors when debugging, try updating the below properties in the netcore\Microsoft.Data.SqlClient.csproj file and try again:

```xml
<OSGroup>Unix</OSGroup>
<TargetsWindows>false</TargetsWindows>
<TargetsUnix>true</TargetsUnix>
```

## Collecting Code Coverage

### Using VSTest
Expand Down
5 changes: 4 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
<configuration>
<packageSources>
<clear />
<add key="sqlclient" value="https://sqlclientdrivers.pkgs.visualstudio.com/public/_packaging/sqlclient/nuget/v3/index.json" />
<!-- We use a curated, vetted ADO feed for our dependencies. -->
<add key="curated" value="https://sqlclientdrivers.pkgs.visualstudio.com/public/_packaging/sqlclient/nuget/v3/index.json" />
</packageSources>
<auditSources>
<clear />

<!-- There is no curated, vetted ADO feed for auditing, so we use the official source. -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</auditSources>
</configuration>
43 changes: 37 additions & 6 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

<!-- Populate all managed projects -->
<ItemGroup>
<AbstractionsPackage Include="src/Microsoft.Data.SqlClient.Extensions/Abstractions/Abstractions.slnx" />
<SqlServerLib Include="**/Microsoft.SqlServer.Server.csproj" />
<NetFxDriver Include="**/netfx/**/Microsoft.Data.SqlClient*.csproj" Condition="'$(IsEnabledWindows)' == 'true'" />
<NetCoreDriver Include="**/netcore/**/Microsoft.Data.SqlClient*.csproj" />
Expand Down Expand Up @@ -91,6 +92,32 @@
<Target Name="BuildTestsNetCore" DependsOnTargets="RestoreTestsNetCore;BuildAKVNetCore;BuildUnitTestsNetCore;BuildFunctionalTestsNetCore;BuildManualTestsNetCore"/>
<Target Name="BuildTestsNetFx" DependsOnTargets="RestoreTestsNetFx;BuildAKVNetFx;BuildUnitTestsNetFx;BuildFunctionalTestsNetFx;BuildManualTestsNetFx" Condition="$(IsEnabledWindows) == 'true'"/>

<!--
The Abstractions package must be built and packed into the packages/
directory before the MDS projects can be restored.

We cannot make the driver targets depend on this one because of the way
MSBuild restores projects in "solution mode". It will attempt to restore
all targets in the graph before building any of them, which fails because
MDS depends on the Abstractions package being built and packed into packages/
first.
-->
<Target Name="BuildAbstractionsPackage">
<PropertyGroup>
<!--
Omit the AbstractionsPackageVersion property entirely if it is empty.
Otherwise, the command-line property will override the default value,
even if empty.
-->
<BuildProperties Condition="'$(AbstractionsPackageVersion)' != ''">AbstractionsPackageVersion=$(AbstractionsPackageVersion)</BuildProperties>
</PropertyGroup>

<MSBuild
Projects="@(AbstractionsPackage)"
Targets="Restore;Build;Pack"
Properties="$(BuildProperties)" />
</Target>

<Target Name="RestoreSqlServerLib">
<MSBuild Projects="@(SqlServerLib)" Targets="restore" />
</Target>
Expand Down Expand Up @@ -271,7 +298,7 @@
<TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand>
</PropertyGroup>
<Message Text=">>> Running Functional test for Windows via command: $(TestCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(TestCommand)" />

Check failure on line 301 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (win11_Azure_Sql net9_0_AnyCPU_NativeSNI_1)

build.proj#L301

build.proj(301,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.FunctionalTests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=1 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Functional-Windowsnetcoreapp-1" " exited with code 1.

Check failure on line 301 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (win11_Azure_Sql net9_0_AnyCPU_NativeSNI_1)

build.proj#L301

build.proj(301,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.FunctionalTests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=1 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Functional-Windowsnetcoreapp-1" " exited with code 1.
</Target>

<!-- Run all Functional tests applicable to Unix. -->
Expand Down Expand Up @@ -320,7 +347,7 @@
<TestCommand>$(TestCommand.Replace($([System.Environment]::NewLine), " "))</TestCommand>
</PropertyGroup>
<Message Text=">>> Running Manual test for Windows via command: $(TestCommand)" />
<Exec ConsoleToMsBuild="true" Command="$(TestCommand)" />

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_ARM64_Sql net8_0_AnyCPU_ManagedSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_ARM64_Sql net462_AnyCPU_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetfxVersion=net462 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetfx --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetfx-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (win11_Azure_Sql net8_0_AnyCPU_NativeSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_Sql net8_0_AnyCPU_ManagedSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient (Win22_Azure_Sql net8_0_AnyCPU_ManagedSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_Sql net462_AnyCPU_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetfxVersion=net462 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetfx --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetfx-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_Sql net9_0_AnyCPU_NativeSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (win11_Azure_Sql net9_0_AnyCPU_ManagedSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net9.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_Sql net8_0_AnyCPU_ManagedSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (Win22_Azure_Sql net8_0_AnyCPU_ManagedSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (win11_Azure_Sql net8_0_AnyCPU_NativeSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package (win11_Azure_Sql net8_0_AnyCPU_NativeSNI_3)

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient-Package

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Package -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.

Check failure on line 350 in build.proj

View check run for this annotation

Azure Pipelines / CI-SqlClient

build.proj#L350

build.proj(350,5): Error MSB3073: The command " dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" --no-build -v n -p:Configuration=Release -p:TargetnetcoreVersion=net8.0 -p:ReferenceType=Project -p:TestSet=3 -p:TestTargetOS=Windowsnetcoreapp --collect "Code coverage" --results-directory TestResults --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" --logger:"trx;LogFilePrefix=Manual-Windowsnetcoreapp-3" " exited with code 1.
</Target>

<!-- Run all Manual tests applicable to Unix. -->
Expand All @@ -346,13 +373,17 @@
<Exec ConsoleToMsBuild="true" Command="$(TestCommand)" />
</Target>

<!-- Clean -->
<!-- Clean all intermediate outputs. -->
<Target Name="Clean">
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","artifacts", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","bin", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","obj", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".","packages", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".",".nuget", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "artifacts", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "bin", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "obj", SearchOption.AllDirectories))' />
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", ".nuget", SearchOption.AllDirectories))' />
</Target>

<!-- Clean all outputs, including NuGet packages. -->
<Target Name="CleanAll" DependsOnTargets="Clean">
<RemoveDir Directories='$([System.IO.Directory]::GetDirectories(".", "packages", SearchOption.AllDirectories))' />
</Target>

<!-- AKV Targets ========================================================= -->
Expand Down
31 changes: 25 additions & 6 deletions eng/pipelines/common/templates/jobs/ci-build-nugets-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ parameters:
type: string
default: ADO-MMS22-SQL19

- name: artifactName
- name: abstractionsArtifactName
type: string
default: Artifacts
default: Abstractions.Artifact

- name: mdsArtifactName
type: string
default: MDS.Artifact

- name: platform
type: string
Expand All @@ -28,6 +32,11 @@ parameters:
type: stepList
default: []

- name: abstractionsPackageVersion
displayName: Abstractions Package Version Override
type: string
default: ''

jobs:
- job: build_nugets

Expand All @@ -44,12 +53,22 @@ jobs:
- ${{ if ne(parameters.prebuildSteps, '') }}:
- ${{ parameters.prebuildSteps }} # extra steps to run before the build like downloading sni and the required configuration

# Download the Abstractions package artifacts and put them in the packages/
# directory in the repo root. This is where the MDS NuGet.config file will
# look for local packages.
- task: DownloadPipelineArtifact@2
displayName: Download Abstractions Package Artifact
inputs:
artifactName: ${{ parameters.abstractionsArtifactName }}
targetPath: $(Build.SourcesDirectory)/packages

- template: ../steps/ci-project-build-step.yml@self
parameters:
platform: ${{ parameters.platform }}
configuration: ${{ parameters.configuration }}
operatingSystem: Windows
build: all
abstractionsPackageVersion: ${{parameters.abstractionsPackageVersion}}

- template: ../steps/generate-nuget-package-step.yml@self
parameters:
Expand All @@ -70,8 +89,8 @@ jobs:
installNuget: false
displayName: 'Generate NuGet package AKV Provider'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Artifacts'
- task: PublishPipelineArtifact@1
displayName: 'Publish Pipeline Artifact'
inputs:
PathtoPublish: $(packagePath)
ArtifactName: ${{ parameters.artifactName }}
targetPath: $(packagePath)
artifactName: ${{ parameters.mdsArtifactName }}
Loading
Loading