Skip to content

Commit be720da

Browse files
committed
User Story 33636: Add Linux build support
- Minimal build changes to get everything to compile on Linux. - Fixed BuildTools target errors. - Changed all <TargetFramework> elements to <TargetFrameworks> which provides better dotnet build output. - Removed unused and obsolete build properties. - Cleaned up BUILDGUIDE. - Replaced <TargetGroup> property with <TargetsNetFx> everywhere. - Normalized how we specify and check the ReferenceType property. - Reorganized how project vs package references are used in build.proj. - Explicity unsetting 'TF' variable inherited from 'ADO Build Properties' library. - Removed 'Update AKV MDS package version' step. - Added TestMicrosoftDataSqlClientVersion property to AKV Package build steps. - Updated CI test step to use new runtime-specific build.proj targets.
1 parent 14bee54 commit be720da

File tree

44 files changed

+855
-510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+855
-510
lines changed

BUILDGUIDE.md

Lines changed: 54 additions & 52 deletions
Large diffs are not rendered by default.

RunPackageReferenceTests.cmd

Lines changed: 27 additions & 27 deletions
Large diffs are not rendered by default.

RunProjectReferenceTests.cmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@ call :pauseOnError msbuild -t:Clean
2929
echo Building .NET Framework %netfxVersion% Tests ...
3030
call :pauseOnError msbuild -p:Configuration="Release"
3131
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetFx
32-
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TargetNetFxVersion=%netfxVersion%
32+
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetFx -p:TF=%netfxVersion%
3333

3434
echo Running .NET Framework %netfxVersion% Tests ...
35-
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-functional-anycpu.xml"
36-
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetfx" -p:TargetNetFxVersion=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-manual-anycpu.xml"
35+
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TF=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-functional-anycpu.xml"
36+
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TF=%netfxVersion% --no-build -v n --filter "category!=nonnetfxtests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netfxVersion%-manual-anycpu.xml"
3737

3838
echo Building .NET %netcoreVersion% Tests ...
3939
call pause
4040
call :pauseOnError msbuild -t:Clean
4141
call :pauseOnError msbuild -p:Configuration="Release"
4242
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildAKVNetCoreAllOS
43-
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:TargetNetCoreVersion=%netcoreVersion%
43+
call :pauseOnError msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:TF=%netcoreVersion%
4444

4545
echo Running .NET %netcoreVersion% Tests ...
46-
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" -p:TargetNetCoreVersion=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-functional-anycpu.xml"
47-
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TestTargetOS="Windowsnetcoreapp" -p:TargetNetCoreVersion=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-manual-anycpu.xml"
46+
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\FunctionalTests\Microsoft.Data.SqlClient.Tests.csproj" -p:Configuration="Release" -p:TF=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-functional-anycpu.xml"
47+
call :pauseOnError dotnet test "src\Microsoft.Data.SqlClient\tests\ManualTests\Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Configuration="Release" -p:TF=%netcoreVersion% --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonwindowstests" -l:"trx;LogFileName=..\..\..\..\..\artifacts\Results\project-%netcoreVersion%-manual-anycpu.xml"
4848

4949
goto :eof
5050

RunTests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ dotnet msbuild -p:Configuration="Release" -t:BuildAKVNetCore -p:OSGroup=Unix -p:
44
echo Building tests
55
dotnet msbuild -p:Configuration="Release" -t:BuildTestsNetCore -p:OSGroup=Unix -p:Platform=AnyCPU
66
echo Running SqlClient test suite
7-
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"
8-
dotnet test "src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TestTargetOS="Unixnetcoreapp" --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"
7+
dotnet test "src/Microsoft.Data.SqlClient/tests/FunctionalTests/Microsoft.Data.SqlClient.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"
8+
dotnet test "src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.csproj" -p:Platform="AnyCPU" -p:Configuration="Release" -p:TF=net8.0 --no-build -v n --filter "category!=nonnetcoreapptests&category!=failing&category!=nonlinuxtests&category!=nonuaptests"

0 commit comments

Comments
 (0)