Add dacpac references to sqlproj with relative path (#14877)

* relative paths written to sqlproj, but can't delete yet

* only keep track of relative path

* remove leading slash

* add test

* use path.relative

* Add error message if dacpac reference is located on a different drive
This commit is contained in:
Kim Santiago
2021-03-30 17:06:04 -07:00
committed by GitHub
parent af4ad1fcb1
commit f4e1f85e0f
5 changed files with 87 additions and 1 deletions

View File

@@ -1020,6 +1020,11 @@ export class DacpacReferenceProjectEntry extends FileProjectEntry implements IDa
public get databaseName(): string {
return path.parse(utils.getPlatformSafeFileEntryPath(this.fsUri.fsPath)).name;
}
public pathForSqlProj(): string {
// need to remove the leading slash from path for build to work
return utils.convertSlashesForSqlProj(this.fsUri.path.substring(1));
}
}
export class SystemDatabaseReferenceProjectEntry extends FileProjectEntry implements IDatabaseReferenceProjectEntry {