microsoft / microsoft/vscode-mssql
[Bug]: Schema Compare Apply/Generate Script fails with "internal error" on SQL Server 2025 on-prem target
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 610
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 97
Description
### Description
Schema Compare "Apply" and "Generate Script" both fail with a generic
internal error when targeting an on-prem SQL Server 2025 database.
No useful detail in the inner exception either way.
Error (both Apply and Generate Script):
Error SQL0: Performing publish is not possible for this comparison result.
System.AggregateException: One or more errors occurred.
(Cannot generate deployment plan due to an internal error.)
---> System.Exception: Cannot generate deployment plan due to an internal error.
--- End of inner exception stack trace --
### Steps to Reproduce
1. Create/import a SQL Database Project targeting Sql170DatabaseSchemaProvider
2. Run Schema Compare against an on-prem SQL Server 2025 database
3. Click Apply, or alternatively "Generate Script"
4. Both fail with the same generic error
Workaround found
SqlPackage.exe /Action:Script (CLI, outside the extension) succeeds
against the same .dacpac and target — suggests the bug is isolated to
the extension's internal deployment-plan/compare code path, not DacFx itself.
### Affected Area
- [ ] Connection dialog (SQL Server | Azure browse/Fabric browse)
- [ ] Query editor
- [ ] Query results panel
- [ ] Object Explorer
- [ ] GitHub Copilot integration
- [ ] Preview/Edit data
- [ ] Table Designer
- [ ] Schema Designer
- [x] Schema Compare
- [ ] Local SQL Server Container provisioning
- [ ] SQL database in Fabric provisioning
- [ ] DACPAC/BACPAC export/import
- [ ] SQL Database projects
- [ ] Query Plan Visualizer
- [ ] Other (please describe below)
### If you selected "Other", please describe the affected area
_No response_
### Environment Information
- Extension version: SQL Database Projects: 1.6.2
- VS Code version: 1.131.0
- Target: Microsoft SQL Server 2025 (RTM) 17.0.1000.7 (X64), Express Edition,
on Windows Server 2022 Datacenter
- DSP: Sql170DatabaseSchemaProvider
### Confirmation
- [x] I have searched existing issues and couldn't find a match
- [ ] I want to work on this issue
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.