A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/sql/tools/sql-database-projects/howto/troubleshoot-sql-project-build below:

Troubleshoot SQL Project Build - SQL Server

The SQL project build output provides feedback on the database model construction and T-SQL validation. The default command line output only shows errors and some status information. In this article, we discuss how to enable more verbose logging to help troubleshoot build issues and common errors that are encountered with SQL projects.

Enable verbose logging

To further troubleshoot build issues for SQL projects, you can use command line switches to generate more logs. More logging can help in not only identifying the cause of errors but also degradation in build speed. The two primary options are:

To recap, the combined command to generate both logs is:

dotnet build -bl -flp:v=diag

The full set of switches can be found at the MSBuild Command-Line Reference.

Common issues Build errors

When the build error indicates invalid syntax, the output also specifies which file contains the erroneous code. If you're using syntax that was recently added, you may need to update your project SDK version.​

Build errors from a database project should have SQLxxxxx error code​, where xxxxx is a five-digit number. Some issues that cause the error for an unresolved reference (SQL71501/SQL71502)​ are:

Other failures

For an error that occurs during restore, first run a clean build after deleting the /bin and /obj folders in the project.

If the error includes SDK 'Microsoft.Build.Sql' specified could not be found​, begin by verifying NuGet package feeds are valid. The base command to view current feeds is:

dotnet nuget list source​

The public NuGet feed is:

dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org​

If your environment requires private feeds, ensure they're valid and accessible. You may be required to authenticate with package feeds. Enabling authentication during project build can be done with:

dotnet build --interactive

For MSBuild, the equivalent command is:

msbuild /p:nugetInteractive=true​

For other non-SQL error codes, refer to the following resources:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4