Microsoft.Build.Sql.Templates 1.0.0-rc1

Prefix Reserved
This is a prerelease version of Microsoft.Build.Sql.Templates.
dotnet new install Microsoft.Build.Sql.Templates::1.0.0-rc1                
This package contains a .NET Template Package you can call from the shell/command line.

Microsoft.Build.Sql.Templates

SQL projects templates for a new project and a sample code analysis rule.

📗 Learn more about SQL projects at https://learn.microsoft.com/sql/tools/sql-database-projects/sql-database-projects

Installing the templates

The templates are available on NuGet. To install the templates, run the following command:

dotnet new install Microsoft.Build.Sql.Templates

Microsoft.Build.Sql projects and code analysis rules can be created using the sqlproj and sqlcodeanalysis templates, respectively. Both projects require .NET SDK 8 or higher.

Using the templates

SQL project

Creating a new project "AdventureWorks" (-n or --name):

dotnet new sqlproj -n "AdventureWorks"

Displaying help information for the SQL project template (-h):

dotnet new sqlproj -h

Creating a new project "AdventureWorksLT" for Azure SQL Database (-tp or --target-platform):

dotnet new sqlproj -n "AdventureWorksLT" -tp "SqlAzureV12"

Creating a new project "AdventureWorks" with a .gitignore file (-g):

dotnet new sqlproj -n "AdventureWorks" -g

New sample code analysis rule

Creating a new sample code analysis rule "WaitForDelay" (-n or --name):

dotnet new sqlcodeanalysis -n "WaitForDelay"

Displaying help information for the SQL code analysis template (-h):

dotnet new sqlcodeanalysis -h

Building the templates

If you want to customize or contribute to the templates, you will need to build and install the templates locally. The following instructions will help you get started.

The templates automatically generate a nupkg on build. To build and install the nupkg locally, run the following command:

dotnet build
dotnet new install bin/Debug/Microsoft.Build.Sql.Templates.1.0.0.nupkg

To uninstall the templates

dotnet new uninstall Microsoft.Build.Sql.Templates

Resources

  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-rc1 711 12/13/2024
0.2.5-preview 757 11/22/2024
0.2.4-preview 719 11/1/2024
0.2.3-preview 1,181 9/19/2024
0.2.0-preview 1,876 7/17/2024
0.1.19-preview 805 6/6/2024
0.1.15-preview 2,204 2/27/2024
0.1.14-preview 4,835 10/23/2023
0.1.12-preview 875 8/28/2023
0.1.10-preview 990 5/12/2023
0.1.9-preview 724 2/13/2023
0.1.7-preview 336 11/10/2022