I'm trying to Publish a database project with Azure Data Studio (ADS) to an Azure SQL Database. The build of the .sqlproj works fine with Visual Studio 2019 (Version 16.11.20) using SSDT, I always get the following output:
Build started...
------ Build started: Project: Database Extract, Configuration: Debug Any CPU ------
Database Extract -> C:\Users\Peter\Source\Repos\Azure DWH\Azure DWH\Database Extract\bin\Output\Database_Extract.dll
Database Extract -> C:\Users\Peter\Source\Repos\Azure DWH\Azure DWH\Database Extract\bin\Output\Database Extract.dacpac
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
Note: The project was originally build using SSDT.
So when I try to Publish the same .sqlproj-file, using the SQL Database Projects extension for ADS, the build starts off just fine, but always ends with the follwing error:
stdout: 127 Warning(s)
stdout: 0 Error(s)
stdout:
stdout: Time Elapsed 00:00:03.65
stdout:
>>> "C:\\Program Files\\dotnet\\dotnet.exe" build "c:\\Users\\Peter\\source\\repos\\Azure DWH\\Azure DWH\\Database Extract\\Database Extract.sqlproj" /p:NetCoreBuild=true /p:NETCoreTargetsPath="c:\\Users\\Peter\\.vscode\\extensions\\ms-mssql.sql-database-projects-vscode-0.19.0\\BuildDirectory" … exited with code: 0
Apparantly the build succeedes because I see a lot of warnings related to incorrect case-referencing of columns and tables which I did not include here. The error is no more non-descriptive than "exited with code 0". The Publish task does not start though.
After some fooling around with creating a new database project from ADS using the existing database as it stands, I managed to get the Build and Publish task working, but of course I want to use the old .sqlproj-file.
Can someone please elaborate on this problem and maybe point me in the right direction so I can use the old project file for the Publish task?
I have tried the following things:
Check the .NET SDK versions on my system, which are the following:
C:\Program Files\dotnet\sdk\
1.04
3.1.426
5.0.408
5.0.413
7.0.102
Reinstalled (repaired) the .NET SDK's and pointed ADS to the SDK folder paths
Installed an older version of the SQL Database Projects extension (current version is 0.20, tried it on 0.14)
Tried the same Build-action on the same .sqlproj with VSCode (using extensions SQL Server (mssql) 1.16.0 and SQL Database Projects 0.19 and 0.20) (got the same error message)
Updated the nuget.config file in C:\...\AppData\Roaming\NuGet with the following becasue of an earlier, different error:
<configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> </packageSources> </configuration>
Completely reinstalled ADS (deleted all preferences and extension folders as well)