Build Issue using SCA 4.6 and SQL Server 2022
daviep
Posts: 7 New member
I'm getting the error below after I upgraded SCA to 4.6 and SQL Server to 2022. Am I missing any installation details?
VS 2022 Version - 17.5.4
SQL Server 2022
SQL Change Automation - 4.6.23102.1176
66>------ Rebuild All started: Project: TW.DB, Configuration: Debug Any CPU ------
VS 2022 Version - 17.5.4
SQL Server 2022
SQL Change Automation - 4.6.23102.1176
66>------ Rebuild All started: Project: TW.DB, Configuration: Debug Any CPU ------
66>MSBUILD: Warning: : Unable to connect to [ TW.DB_DAVIE405_SHADOW] in order to perform shadow clean:
66>Error connecting to database: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: HTTP Provider, error: 0 - ): Error connecting to database: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: HTTP Provider, error: 0 - )
66>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\SqlChangeAutomation\SqlChangeAutomation.Data.Schema.Ssdt.targets(455,5): Error: MSB4181: The "DBCleanTask" task returned false but did not log an error.
66>Done building project " TW.DB.sqlproj" -- FAILED.
Tagged:
Answers
This is a known issue with the latest versions of Visual Studio 2022 when creating or using a project it, it's not able to set the trust server certificate through the UI. The developers are currently looking into it
You should be able to workaround this for now by modifying the connecting to the shadow database and adding the needed connection parameters
For example here's mine:
https://documentation.red-gate.com/sca/developing-databases/concepts/shadow-database
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
Here's the "About" details:
=====================================
The issue is still being investigated by the team and the ideal workaround is to switch to VS 2019 for now
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?
If you upgrade to "SCA 4.6.23171.1653" this should now be fixed
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?