Don't show update project warning for new style sqlproj (#17490)

* don't show SSDT update warning for new style projects

* update strings

* add checks for the 2 other ways to specify msbuild sdk

* add link to docs on how to use project sdk

Co-authored-by: Kim Santiago <kisantia@Kims-MacBook-Pro.local>
This commit is contained in:
Kim Santiago
2021-10-27 12:53:38 -07:00
committed by GitHub
parent ab6b290b04
commit fee9c6e071
8 changed files with 112 additions and 22 deletions

View File

@@ -1057,25 +1057,6 @@ export class ProjectsController {
return new AddDatabaseReferenceDialog(project);
}
public async updateProjectForRoundTrip(project: Project) {
if (project.importedTargets.includes(constants.NetCoreTargets) && !project.containsSSDTOnlySystemDatabaseReferences()) {
return;
}
if (!project.importedTargets.includes(constants.NetCoreTargets)) {
const result = await vscode.window.showWarningMessage(constants.updateProjectForRoundTrip, constants.yesString, constants.noString);
if (result === constants.yesString) {
await project.updateProjectForRoundTrip();
await project.updateSystemDatabaseReferencesInProjFile();
}
} else if (project.containsSSDTOnlySystemDatabaseReferences()) {
const result = await vscode.window.showWarningMessage(constants.updateProjectDatabaseReferencesForRoundTrip, constants.yesString, constants.noString);
if (result === constants.yesString) {
await project.updateSystemDatabaseReferencesInProjFile();
}
}
}
private async addTemplateFiles(newProjFilePath: string, projectTypeId: string): Promise<void> {
if (projectTypeId === constants.emptySqlDatabaseProjectTypeId || newProjFilePath === '') {
return;