mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
Update system database references from SSDT (#10891)
* convert system database references from SSDT * remove empty ItemGroup if no other database references * fix baseline files * also update sqlproj if system database references were added in SSDT since the sqlproj got updated with ADS imports * undo change * move updating system db references out of updateProjectForRoundTrip() * update test to have an already updated system db ref * add clean target after merge from master * add await * addressing comments
This commit is contained in:
@@ -443,13 +443,21 @@ export class ProjectsController {
|
||||
}
|
||||
|
||||
public async updateProjectForRoundTrip(project: Project) {
|
||||
if (project.importedTargets.includes(constants.NetCoreTargets)) {
|
||||
if (project.importedTargets.includes(constants.NetCoreTargets) && !project.containsSSDTOnlySystemDatabaseReferences()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await this.apiWrapper.showWarningMessage(constants.updateProjectForRoundTrip, constants.yesString, constants.noString);
|
||||
if (result === constants.yesString) {
|
||||
await project.updateProjectForRoundTrip();
|
||||
if (!project.importedTargets.includes(constants.NetCoreTargets)) {
|
||||
const result = await this.apiWrapper.showWarningMessage(constants.updateProjectForRoundTrip, constants.yesString, constants.noString);
|
||||
if (result === constants.yesString) {
|
||||
await project.updateProjectForRoundTrip();
|
||||
await project.updateSystemDatabaseReferencesInProjFile();
|
||||
}
|
||||
} else if (project.containsSSDTOnlySystemDatabaseReferences()) {
|
||||
const result = await this.apiWrapper.showWarningMessage(constants.updateProjectDatabaseReferencesForRoundTrip, constants.yesString, constants.noString);
|
||||
if (result === constants.yesString) {
|
||||
await project.updateSystemDatabaseReferencesInProjFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user