Skip to content

VSTO for Outlook and the known issue of the 3 **Microsoft.Data.SqlClient.SNI.xxx.dll** #2480

Open

Description

@Coradis

Hello team,

Describe the bug

This concerns the publish of a VSTO for Outlook and the known issue of the 3 Microsoft.Data.SqlClient.SNI.xxx.dll files that are not included in the deployment folder as Microsoft.Data.SqlClient.SNI.xxx.dll.deploy files.

Our environment is Visual Studio 2017 in dotnet 4.6.2, so we've just changed the use of the system.data.sqlclient component to microsoft.data.sqlclient Nuget. This is a substantial application that we'll have to maintain in .NET Framework 4.x and, for various reasons, still under VS 2017 (but we plan to transport it to VS 2022 asap).

To reproduce

  1. Create a VSTO project under VS 2017
  2. Reference Nuget Microsoft.Data.SqlClient
  3. Standard publish
  4. Observe the publish folder :

image

Expected behavior

Of course the files are copied to the deployment folder :-)

Further technical details

Microsoft.Data.SqlClient version: 5.2.0
Visual Studio 2017
.NET target: Framework 4.6.2
Operating system: Windows 10

Additional context

I've read every single issue on your site and in other sites, and unless I'm wrong, I haven't found a suitable solution. For now, our workaround in the csproj file is as follows (found here https://developercommunity.visualstudio.com/t/VSTO-Project-does-not-deploy-MicrosoftD/10512579?sort=newest by Alexander Milenz ) :

image

Has the most elegant possible solution been found since then? and that I may have missed.
Thank you very much for your help.

Kind regards,
Herve

Activity

  1. moved this from To triage to Backlog in SqlClient Boardon Nov 28, 2025
  2. priyankatiwari08 commented on Sep 17, 2026

    @priyankatiwari08
    Contributor

    /triage

  3. github-actions commented on Sep 17, 2026

    @github-actions

    🔍 Triage Summary (on-demand re-triage)

    Check Result
    Issue type Bug
    Environment All required environment details provided for investigation
    Area Area\Native SNI
    Duplicates Potentially related: #766, #4129 (parent tracking issue), #1955, #936, #446
    Regression Not indicated — this is a longstanding known limitation, not a regression

    Analysis

    This issue is a known packaging/deployment problem: the native Microsoft.Data.SqlClient.SNI.{x86,x64,arm64}.dll files ship without a .deploy extension, so VS 2017 ClickOnce/VSTO publish does not include them in the publish manifest, causing the app to fail at the customer machine due to the missing native SNI binary. This is already tracked as a sub-issue of the parent epic #4129 ("SNI loading issues") and is functionally the same root cause reported in #766 (VSTO Add-ins + ClickOnce). Severity is P2 — there is a documented workaround (manually adding .deploy copies via csproj target), but it is a recurring pain point for .NET Framework/ClickOnce/VSTO consumers and affects a widening cross-section of legacy deployment models.

    Next Steps

    • Recommend reviewing Microsoft.Data.SqlClient.SNI not deployed along with ClickOnce for VSTO Add-ins #766 and the parent tracking issue SNI loading issues #4129 before further investigation, since the root cause (native SNI DLLs excluded from ClickOnce publish manifests due to missing .deploy file naming) is shared across all of these.
    • Suggest consolidating: this issue could be linked/merged into the discussion on Microsoft.Data.SqlClient.SNI not deployed along with ClickOnce for VSTO Add-ins #766 to avoid duplicate investigation effort, since both report VSTO/ClickOnce-specific non-deployment of Microsoft.Data.SqlClient.SNI.*.dll.
    • If a fix is pursued, it likely needs to happen either in the Microsoft.Data.SqlClient.SNI NuGet package's build/targets file (auto-generating .deploy copies or content items recognized by ClickOnce), or via updated official guidance/documentation pointing users to the MSBuild workaround already found by the reporter (adding a build target that copies the SNI DLLs as .deploy files into $(PublishDir)).
    • Consider assigning to Copilot coding agent to investigate whether Microsoft.Data.SqlClient.SNI.targets/.props can be updated so ClickOnce-based publish (VSTO, WinForms, WebForms) picks up the native SNI DLLs automatically, referencing the workaround pattern already shared by the reporter.

    Note: This triage summary is auto-generated by an AI agent. The analysis and suggestions above have not been verified by a human maintainer. Please treat as preliminary guidance only.

    Generated by SqlClient Issue Auto-Triage for #2480 · copilot · auto · 51 AIC · ⌖ 13.1 AIC · ⊞ 11.9K · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions