microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.53k stars 896 forks source link

SQL Database Projects: SqlStaticCodeAnalysisTask task was not found when building project #13781

Open holytshirt opened 3 years ago

holytshirt commented 3 years ago

Steps to Reproduce:

  1. Opened Sql Database project created in Visual Studio with "Enable Code Analysis on Build" Enabled.
    Build Fails with

    stdout: c:\Users\blah\.azuredatastudio-insiders\extensions\microsoft.sql-database-projects-0.5.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(1345,7):
    error MSB4036: The "SqlStaticCodeAnalysisTask" task was not found. Check the following: 
    1.) The name of the task in the project file is the same as the name of the task class. 
    2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 
    3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\Program Files\dotnet\sdk\5.0.100" directory. [d:\dev\blah\blah\src\Database\Database.sqlproj]
  2. Opened Sql Database project created in Visual Studio with "Enable Code Analysis on Build" Disabled. Build is successful!

kisantia commented 3 years ago

needs to be done in DacFx