Skip to content

Commit

Permalink
adds readme to templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dzsquared committed Dec 13, 2024
1 parent 500ce2b commit d6d8a2e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Description>Templates for creating new Microsoft.Build.Sql projects.</Description>
<PackageTags>DacFx sqlproj</PackageTags>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IncludeBuildOutput>false</IncludeBuildOutput>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<NoDefaultExcludes>true</NoDefaultExcludes>
Expand All @@ -22,6 +23,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="$(EnlistmentRoot)/LICENSE.txt" PackagePath="/" Pack="true" />
<Content Include="README.md" PackagePath="/" Pack="true" />
<Content Include="$(TemplateIntermediateOutputPath)\**" PackagePath="content/" Pack="true" />
</ItemGroup>

Expand Down
17 changes: 15 additions & 2 deletions src/Microsoft.Build.Sql.Templates/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 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](https://www.nuget.org/packages/Microsoft.Build.Sql.Templates/). To install the templates, run the following command:
Expand All @@ -8,10 +12,13 @@ The templates are available on [NuGet](https://www.nuget.org/packages/Microsoft.
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`):

```bash
Expand Down Expand Up @@ -63,9 +70,15 @@ dotnet build
dotnet new install bin/Debug/Microsoft.Build.Sql.Templates.1.0.0.nupkg
```


To uninstall the templates

```bash
dotnet new uninstall Microsoft.Build.Sql.Templates
```
```


## Resources

- [Primary documentation](https://aka.ms/sqlprojects)
- [CI/CD workflow samples](https://aka.ms/sqlprojects-samples)
- [GitHub repository](https://github.com/microsoft/dacfx)
8 changes: 0 additions & 8 deletions src/Microsoft.Build.Sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ Depending on where you are developing, additional steps may be required. A walk-
- [CI/CD workflow samples](https://aka.ms/sqlprojects-samples)
- [GitHub repository](https://github.com/microsoft/dacfx)

## Current Status
This project is in preview and we are currently building tests for different functionality. Contributors welcome. Please feel free to open issues for bugs or improvements, or send PRs directly.

The latest release can be found on [Nuget.org](https://www.nuget.org/packages/Microsoft.Build.Sql/).

Building and publishing database project is supported in [Azure Data Studio](https://github.com/microsoft/azuredatastudio) and [VS Code](https://marketplace.visualstudio.com/items?itemName=ms-mssql.sql-database-projects-vscode). Support for SDK-style projects will be added in Visual Studio SQL Server Data Tools (SSDT) in a future release.


## Telemetry
The .NET SDK for SQL includes a telemetry feature that collects usage data and sends it to Microsoft when you use build commands. The usage data includes exception information when the build command fails. Telemetry data helps the .NET team understand how the tools are used so they can be improved. Information on failures helps the team resolve problems and fix bugs.

Expand Down

0 comments on commit d6d8a2e

Please sign in to comment.