Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.3 KB

File metadata and controls

55 lines (34 loc) · 1.3 KB

Microsoft.Build.Sql.Templates

Installing the templates

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

dotnet new install Microsoft.Build.Sql.Templates

Using the templates

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

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