| title | Create a .NET DLL from a C# Project |
|---|---|
| description | Package your .NET project into a DLL file when using SQL Server Language Extensions to execute C# code. |
| author | rwestMSFT |
| ms.author | randolphwest |
| ms.date | 08/28/2025 |
| ms.service | sql |
| ms.subservice | language-extensions |
| ms.topic | how-to |
| monikerRange | >=sql-server-ver15 || >=sql-server-linux-ver15 |
[!INCLUDE sqlserver2019-and-later]
Learn how to package your C# code into a dynamic link library (DLL) file, when using SQL Server Language Extensions.
To create a .dll, navigate to the folder containing your C# project and run this command, where MyProject.csproj is the name of the project file:
dotnet publish MyProject.csproj