Microsoft.SqlServer.DacFx 170.3.93

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.SqlServer.DacFx --version 170.3.93
                    
NuGet\Install-Package Microsoft.SqlServer.DacFx -Version 170.3.93
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.SqlServer.DacFx" Version="170.3.93" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.SqlServer.DacFx" Version="170.3.93" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.SqlServer.DacFx" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.SqlServer.DacFx --version 170.3.93
                    
#r "nuget: Microsoft.SqlServer.DacFx, 170.3.93"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.SqlServer.DacFx@170.3.93
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.SqlServer.DacFx&version=170.3.93
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.SqlServer.DacFx&version=170.3.93
                    
Install as a Cake Tool

Microsoft SQL Server Data-Tier Application Framework (DacFx) Nuget Package

Overview

The Microsoft SQL Server Data-Tier Application Framework (DacFx) is a .NET library which provides application lifecycle services for database development and management for Microsoft SQL databases. DacFx supports various database deployment and management scenarios, including extracting / exporting a live database to a DAC package, deploying a DAC package to a new or existing database, and migrating from on-premises to Microsoft Azure. DacFx can target all supported versions of SQL Server, as well as Microsoft Azure SQL and SQL in Fabric.

📘 DacFx .NET API documentation

📗 SQL projects database DevOps documentation

If you would like to use DacFx functionality from the command-line for creating and deploying .dacpac and .bacpac packages, please use the SqlPackage CLI as a dotnet tool or downloadable exe. Learn more about SqlPackage from http://aka.ms/sqlpackage.

Usage

The following examples demonstrate some basic functionality of the DacFx API. For more detailed examples, please refer to the DacFx API documentation.

Example: Deploy a .dacpac to a database

using Microsoft.SqlServer.Dac;

string dacpacPath = "path\\to\\your.dacpac";
string connectionString = "your-database-connection-string";
DacServices dacServices = new DacServices(connectionString);
DacPackage dacPackage = DacPackage.Load(dacpacPath);
dacServices.Deploy(dacPackage, "TargetDatabaseName", upgradeExisting: true);

Example: Extract a database to a .dacpac

using Microsoft.SqlServer.Dac;
string connectionString = "your-database-connection-string";
string dacpacOutputPath = "path\\to\\output.dacpac";
DacServices dacServices = new DacServices(connectionString);
DacExtractOptions extractOptions = new DacExtractOptions();
dacServices.Extract(dacpacOutputPath, "SourceDatabaseName", "SourceDatabaseName", extractOptions);

Example: Extract a database to .sql files organized by object type and schema

using Microsoft.SqlServer.Dac;
string connectionString = "your-database-connection-string";
string sqlOutputDirectory = "path\\to\\output\\directory";
DacServices dacServices = new DacServices(connectionString);
DacExtractOptions extractOptions = new DacExtractOptions
{
    ExtractTarget = DacExtractTarget.SchemaObjectType
};
dacServices.Extract(sqlOutputDirectory, "SourceDatabaseName", "SourceDatabaseName", extractOptions);

Component Links Summary
SqlPackage 📦 Tool<br/>📗 Docs Microsoft.SqlPackage is a cross-platform command-line utility for creating and deploying .dacpac and .bacpac packages. SqlPackage can be installed as a dotnet tool.
DacpacVerify 📦 Tool Microsoft.DacpacVerify is a cross-platform command-line utility for checking that two .dacpac packages match, including pre/post-deployment scripts and SQLCMD variables.
Dacpacs.(Master,Msdb) 📦 Master<br/>📦 Msdb Microsoft.SqlServer.Dacpacs.Master and Microsoft.SqlServer.Dacpacs.Msdb is a set of NuGet packages containing .dacpac files for Microsoft SQL Server system databases (master, msdb) with versions across SQL Server 2008 (100) through SQL Server 2022 (160).
Dacpacs.Azure.Master 📦 NuGet Microsoft.SqlServer.Dacpacs.Azure.Master is a NuGet package containing a .dacpac file for the Azure SQL Database master database.
Dacpacs.DbFabric 📦 NuGet Microsoft.SqlServer.Dacpacs.DbFabric is a NuGet package containing a .dacpac file for the SQL database in Fabric system objects.
Dacpacs.Synapse.Master 📦 NuGet Microsoft.SqlServer.Dacpacs.Synapse.Master is a NuGet package containing a .dacpac file for the Azure Synapse Analytics master database.
Dacpacs.SynapseServerless.Master 📦 NuGet Microsoft.SqlServer.Dacpacs.SynapseServerless.Master is a NuGet package containing a .dacpac file for the Azure Synapse Analytics serverless SQL pools master database.
ScriptDom 📦 NuGet<br/>🛠️ Code<br/>📘 API Docs Microsoft.SqlServer.TransactSql.ScriptDom is a NuGet package containing the Transact-SQL parser ScriptDOM. The source code is licensed MIT.
Microsoft.Build.Sql 📦 NuGet<br/>📗 Docs<br/>🛠️ Code Microsoft.Build.Sql is a .NET project SDK for SQL projects, compiling T-SQL code to a data-tier application package (dacpac).
Project Templates 📦 NuGet<br/>🛠️ Code Microsoft.Build.Sql.Templates is a set of .NET project templates for SQL projects.

Support

Open issues at DacFx GitHub

Important Notice: Breaking Changes Due to Public Key Update

We would like to inform you about an important change in DacFx NuGet that may impact your applications. We have updated the public key in the DLLs included in this package. This change is crucial for enhancing the security and integrity of our assembly but may cause breaking changes in your C# applications.

Impact of Public Key Change

  • Build Failures: Applications referencing the old DLL with the previous public key will fail to build.
  • Runtime Errors: Applications may experience runtime errors if the old DLL is loaded dynamically or through reflection.
  • Configuration Updates: Any configuration files or settings that reference the old public key will need to be updated to the new key.

Steps to Address the Change

To mitigate the impact of this change, we recommend the following steps:

  • Update Package References: Ensure that you update your NuGet package reference to the latest version that includes the DLL with the new public key.
  • Rebuild Your Application: Rebuild your application to ensure it correctly references the new DLL.
  • Thorough Testing: Conduct comprehensive testing to identify and resolve any issues resulting from the public key change.
  • Update Documentation: Ensure that all relevant documentation and configuration files are updated to reflect the new public key.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (49)

Showing the top 5 NuGet packages that depend on Microsoft.SqlServer.DacFx:

Package Downloads
Kentico.Xperience.Libraries

The runtime assemblies for libraries and applications that use Kentico Xperience API.

Microsoft.Data.Tools.Msbuild

This NuGet package contains all the required components to build and publish sqlproj project. This package allows to users to create local build agent without installing visual studio and enables continuous integration and continuous deployment scenarios. SSDT transforms database development by introducing a ubiquitous, declarative model that spans all the phases of database development inside Visual Studio. You can use SSDT Transact-SQL design capabilities to build, debug, maintain, and refactor databases. You can work with a database project, or directly with a connected database instance on or off-premise. SSDT team's blog - https://blogs.msdn.microsoft.com/ssdt/ SQL Server Data Tools page - https://docs.microsoft.com/sql/ssdt/sql-server-data-tools

Apollo13.DataAccessLayer

Data access layer for SQL server

Cake.SqlServer

Cake Build addon for executing some operations in MS Sql Server.

Dynamicweb.Application.UI

Package Description

GitHub repositories (7)

Showing the top 7 popular GitHub repositories that depend on Microsoft.SqlServer.DacFx:

Repository Stars
ErikEJ/EFCorePowerTools
Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
microsoft/sqltoolsservice
SQL Tools API service that provides SQL Server data management capabilities.
rr-wfm/MSBuild.Sdk.SqlProj
An MSBuild SDK that provides similar functionality to SQL Server Data Tools (.sqlproj) projects
trimble-oss/dba-dash
DBA Dash - SQL Server Monitoring Tool
tsqllint/tsqllint
Configurable linting for TSQL
iQuarc/Geco
Simple code generator based on a console project, running on .Net core and using C# interpolated strings
Version Downloads Last Updated
170.4.20-preview 37 3/5/2026
170.3.93 34,499 2/10/2026
170.3.83-preview 409 1/23/2026
170.3.79-preview 181 1/20/2026
170.3.63-preview 2,332 12/19/2025
170.3.54-preview 812 12/12/2025
170.3.37-preview 1,249 11/14/2025
170.3.26-preview 251 10/31/2025
170.2.70 410,027 10/14/2025
170.2.68-preview 245 10/4/2025
170.2.55-preview 258 9/26/2025
170.2.41-preview 419 9/4/2025
170.2.37-preview 316 8/29/2025
170.2.32-preview 194 8/22/2025
170.2.25-preview 451 8/18/2025
170.2.15-preview 324 8/8/2025
170.1.61 329,590 7/30/2025
170.1.56-preview 189 7/18/2025
170.1.47-preview 841 6/27/2025
170.1.43-preview 512 6/20/2025
Loading failed