Skip to content

Upgrading to .NET 10 (.NET 8 for SqlCore)#2634

Merged
Benjin merged 12 commits intomainfrom
dev/benjin/net10
Mar 30, 2026
Merged

Upgrading to .NET 10 (.NET 8 for SqlCore)#2634
Benjin merged 12 commits intomainfrom
dev/benjin/net10

Conversation

@Benjin
Copy link
Copy Markdown
Contributor

@Benjin Benjin commented Mar 27, 2026

Description

  • Upgrading all binaries from .NET 8 to .NET 10
  • ...except for SqlCore, which is going from 6 to 8 (Fabric backend is lagging)
  • New STS major version number is 6.x
  • Also applies fixes and warning levels to new .NET 10 warnings
  • Also fixes a logging-related bug in the new build infra

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (dotnet test)
  • Code follows contributing guidelines
  • Logging/telemetry updated if relevant
  • No protocol or behavioral regressions

Reviewers: Please read our reviewer guidelines

@github-actions
Copy link
Copy Markdown

As part of updating the dependencies in Packages.props we require that any PRs opened also verify that
they've done the following checks.

Please respond to this comment verifying that you've done the appropriate validation (or explain why it's not necessary) before merging in the PR

  • Built and tested the change locally to validate that the update doesn't cause any regressions and fixes the issues intended
  • Tested changes on all major platforms
    • Windows
    • Linux
    • Mac
  • Check the source repo for any open issues with the release being updated to (if available)

aasimkhan30
aasimkhan30 previously approved these changes Mar 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the repo’s build/runtime targets to .NET 10 (with SqlCore moving from .NET 6 to .NET 8), updates build/pipeline infrastructure accordingly, and applies small code adjustments needed for newer framework/analyzer behaviors.

Changes:

  • Bump project TFMs across src/test to net10.0 (and SqlCore to net8.0), plus update global.json SDK selection.
  • Update build infrastructure (Cake + Azure Pipelines + build.json) to use net10.0 artifact paths and adjust release versioning.
  • Apply framework-driven code cleanups (generic Enum.* APIs, Stream.ReadExactly, test assertion modernizations, analyzer config updates).

Reviewed changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/ScriptGenerator/ScriptGenerator.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.Test.CompletionExtension/Microsoft.SqlTools.Test.CompletionExtension.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.UnitTests/ServiceHost/ScriptFileTests.cs Modernize exception assertions
test/Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.UnitTests/DacFx/CodeAnalysisRulesTests.cs Use newer Enum.IsDefined overload
test/Microsoft.SqlTools.ServiceLayer.UnitTests/AssemblyInfo.cs Remove #nullable disable
test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Properties/AssemblyInfo.cs Remove #nullable disable
test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Microsoft.SqlTools.ServiceLayer.TestEnvConfig.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.TestDriver/Microsoft.SqlTools.ServiceLayer.TestDriver.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.PerfTests/Microsoft.SqlTools.ServiceLayer.PerfTests.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Properties/AssemblyInfo.cs Remove #nullable disable
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/ModelManagement/ModelOperationsTests.cs Modernize exception assertions
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/DisasterRecovery/RestoreDatabaseServiceTests.cs Use generic Enum.Parse<T>
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/DisasterRecovery/BackupRestoreUrlTests.cs Use generic Enum.Parse<T>
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/DacFx/DacFxServiceTests.cs Use generic Enum.GetNames<T>
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Connection/ReliableConnectionTests.cs Modernize exception assertions
test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/AssemblyInfo.cs Remove #nullable disable
test/Microsoft.SqlTools.Migration.IntegrationTests/Microsoft.SqlTools.Migration.IntegrationTests.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.csproj Target framework bumped to net10.0
test/Microsoft.SqlTools.Authentication.UnitTests/Microsoft.SqlTools.Authentication.UnitTests.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.SqlCore/ObjectExplorer/SmoModel/SmoTreeNodes.cs Fix/adjust dropped-ledger vs external table child factories and SMO property requirements
src/Microsoft.SqlTools.SqlCore/Microsoft.SqlTools.SqlCore.csproj Target framework bumped to net8.0
src/Microsoft.SqlTools.Shared/Microsoft.SqlTools.Shared.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.ServiceLayer/Scripting/ScriptingScriptOperation.cs Use generic Enum.Parse<T>
src/Microsoft.SqlTools.ServiceLayer/QueryExecution/DataStorage/ServiceBufferFileStreamReader.cs Use ReadExactly for deterministic reads
src/Microsoft.SqlTools.ServiceLayer/ObjectManagement/SecurableUtils.cs Use generic Enum.GetValues<T>
src/Microsoft.SqlTools.ServiceLayer/ObjectManagement/ObjectTypes/Server/ServerPrototype.cs Use generic Enum.Parse<T>
src/Microsoft.SqlTools.ServiceLayer/ObjectManagement/ObjectTypes/Server/ServerHandler.cs Use generic Enum.GetNames<T>
src/Microsoft.SqlTools.ServiceLayer/ObjectManagement/ObjectTypes/Security/PermissionsData.cs Use generic Enum.GetValues<T>
src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.ServiceLayer/LanguageServices/ConnectedBindingContext.cs Use generic Enum.GetValues<T>
src/Microsoft.SqlTools.ServiceLayer/LanguageExtensibility/Contracts/ExternalLanguageModel.cs Use generic Enum.Parse<T>
src/Microsoft.SqlTools.ServiceLayer/ExecutionPlan/ShowPlan/RelOpTypeParser.cs Use newer Enum.GetName overload
src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/CommonUtilities.cs Use generic Enum.Parse<T>
src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/BackupOperation/BackupOperation.cs Minor string parsing simplification
src/Microsoft.SqlTools.ServiceLayer/DacFx/GenerateTSqlModelOperation.cs Use generic Enum.Parse<T>
src/Microsoft.SqlTools.ServiceLayer/Agent/Jobs/AgentProxyAccountActions.cs Use generic Enum.GetValues<T>
src/Microsoft.SqlTools.ServiceLayer/Admin/Database/DatabasePrototype.cs Use generic Enum.GetValues<T>
src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.ResourceProvider.Core/Microsoft.SqlTools.ResourceProvider.Core.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.Migration/Microsoft.SqlTools.Migration.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj Target frameworks bumped; update conditional internals visibility group
src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj Replace net8.0 with net10.0 in multi-targeting
src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.Connectors.VSCode/Microsoft.SqlTools.Connectors.VSCode.csproj Target framework bumped to net10.0
src/Microsoft.SqlTools.Authentication/Microsoft.SqlTools.Authentication.csproj Target framework bumped to net10.0
global.json Pin SDK to 10.0.100
build.json Update build/test frameworks to net10.0
build.cake Fix logging/error handling around exitStatus scope
azure-pipelines/release.yml Update artifact names from net8.0 to net10.0
azure-pipelines/osx-arm64-signing.yml Update artifact names from net8.0 to net10.0
azure-pipelines/build.yml Update archive paths/names from net8.0 to net10.0
azure-pipelines/build-and-release.yml Bump major release version to 6
Packages.props Update System.Configuration.ConfigurationManager version
.editorconfig Add/adjust analyzer severities for newer SDK/analyzers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Benjin Benjin marked this pull request as draft March 27, 2026 01:24
@Benjin Benjin marked this pull request as ready for review March 27, 2026 22:59
Copilot AI review requested due to automatic review settings March 27, 2026 22:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 62 out of 62 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 28, 2026 00:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 63 out of 63 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

kburtram
kburtram previously approved these changes Mar 30, 2026
<AssemblyTitle>SqlTools SqlCore Library</AssemblyTitle>
<Description>Provides core sql functionality for SQL server editors like Object explorer, Query Execution, and Scripting</Description>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not use .Net 10 as well, I guess we want this to trail an LTS version.

Copy link
Copy Markdown
Contributor Author

@Benjin Benjin Mar 30, 2026

Choose a reason for hiding this comment

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

Unfortunately, Fabric workloads are lagging a bit, and currently can only target as high as .NET 8, so we're stuck pinning this for now.

@Benjin Benjin merged commit 2b65714 into main Mar 30, 2026
9 checks passed
@Benjin Benjin deleted the dev/benjin/net10 branch March 30, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants