Hello anil nair
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
Based on the error details shares, looks like the error is related to the missing Microsoft.Data.Tools.Schema.SqlTasks.targets
file. This file is part of the SQL Server Data Tools (SSDT) package, which is used to build SQL Server projects in Visual Studio.
To resolve this issue, you need to install the SQL Server Data Tools (SSDT) package on the machine where you are running the build. You can download the latest version of SSDT from the following link: https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver15
Regarding your question about building SQL projects on Linux servers, yes, it is possible to build SQL projects on Linux servers using .NET Core and the SQL Server command-line tools. You can find more information about this in the following Microsoft documentation: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode?view=sql-server-ver15
Hope this helps.
If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.