Skip to content

Support building on Linux - #3311

Closed
paulmedynski wants to merge 2 commits into
mainfrom
dev/paul/linux-build-minimal
Closed

paulmedynski wants to merge 2 commits into
mainfrom
dev/paul/linux-build-minimal

Conversation

@paulmedynski

@paulmedynski paulmedynski commented Apr 29, 2025 •

Copy link
Copy Markdown
Contributor

Work-in Progress

Changes to the build system to support building all targets on Linux. This mostly involved removing properties from build.proj that artifically restricted what would be built based on the OS, and then filtering those changes down into all of the project files.

Major Changes:

  • All projects can be built on Windows and Linux.
    • macOS has not been fully tested due to a lack of hardware, but CI builds on macOS are working.
  • The TF property is now used to explicitly decide what Target Frameworks to specify when building AKV and tests, and running tests.
    • This replaces many build.proj properties:
      • IsEnabledWindows
      • TargetGroup
      • TargetNetFxVersion
      • TargetNetCoreVersion
      • TestOS
      • TestTargetOS
      • TFGroup
    • If you don't specify TF then all Target Frameworks are built (net462, net8.0, net9.0).
    • If you specify a build.proj target that implies .NET Framework, then just net462 is used.
    • If you specify a build.proj target that implies .NET, then net8.0 and net9.0 are used.
  • The RunFunctionalTestsWindows, RunFunctionalTestsUnix, RunManualTestsWindows, and RunManualTestsUnix targets now runs .NET tests only.
  • New RunFunctionalTestsWindowsNetFx and RunManualTestsWindowsNetFx targets were added that run those .NET Framework tests on Windows.
  • Scripts and pipelines were updated to use TF where appropriate.

Internal Changes:

  • The build.proj targets that imply a Target Framework use new BuildProj and TargetsNetFx properties to control the downstream projects where necessary (i.e. AKV and test projects).
  • All projects now use <TargetFrameworks>, even if they only specify a single target framework.
  • Fixed filenames for case-sensitive filesystems.
  • Removed unnecessary Directory.Build.props files.

Outstanding Issues:

  • The BuildTests target still doesn't work (it didn't work before these changes). There is a problem building .NET and .NET Framework targets in parallel.
  • The AKV targets on Linux fail to find the .NET Framework reference assemblies after building for .NET, but re-running the .NET Framework targets works. There is likely an issue with the restore process.

@paulmedynski
paulmedynski force-pushed the dev/paul/linux-build-minimal branch 2 times, most recently from cd8b194 to 4081087 Compare May 1, 2025 11:49
@codecov

codecov Bot commented May 2, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 67.71%. Comparing base (6c12daf) to head (701e97a).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...qlClient/Server/SmiEventSink_DeferredProcessing.cs 0.00% 1 Missing ⚠️
...t/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3311      +/-   ##
==========================================
- Coverage   67.74%   67.71%   -0.04%     
==========================================
  Files         299      293       -6     
  Lines       65564    65254     -310     
==========================================
- Hits        44419    44185     -234     
+ Misses      21145    21069      -76     
Flag Coverage Δ
addons ?
netcore 72.25% <ø> (+0.11%) ⬆️
netfx 66.17% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- 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.
@paulmedynski
paulmedynski force-pushed the dev/paul/linux-build-minimal branch from 701e97a to 61bd2de Compare July 23, 2025 18:18
- Fixed unsaved merge conflict resolution.
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Oct 16, 2025
@cheenamalhotra cheenamalhotra moved this from To triage to In progress in SqlClient Board Oct 16, 2025
@paulmedynski
paulmedynski deleted the dev/paul/linux-build-minimal branch February 4, 2026 14:10
@github-project-automation github-project-automation Bot moved this from In progress to Done in SqlClient Board Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant