mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
Required changes to make sql projects extension work with vscode (#22847)
* Update CreateProject api * More updates * Fix a few comments * Address comments * Remove package.json changes * Fix error * Fix testUtil
This commit is contained in:
@@ -12,7 +12,9 @@ import * as extractZip from 'extract-zip';
|
||||
import * as constants from '../common/constants';
|
||||
import { HttpClient } from '../common/httpClient';
|
||||
import { DBProjectConfigurationKey } from './netcoreTool';
|
||||
import { ProjectType } from 'mssql';
|
||||
import { ProjectType } from '../common/typeHelper';
|
||||
import * as mssql from 'mssql';
|
||||
import * as vscodeMssql from 'vscode-mssql';
|
||||
|
||||
const buildDirectory = 'BuildDirectory';
|
||||
const sdkName = 'Microsoft.Build.Sql';
|
||||
@@ -136,10 +138,18 @@ export class BuildHelper {
|
||||
// Right now SystemDacpacsLocation and NETCoreTargetsPath get set to the same thing, but separating them out for if we move
|
||||
// the system dacpacs somewhere else and also so that the variable name makes more sense if building from the commandline,
|
||||
// since SDK style projects don't to specify the targets path, just where the system dacpacs are
|
||||
if (sqlProjStyle === ProjectType.SdkStyle) {
|
||||
return ` build ${projectPath} /p:NetCoreBuild=true /p:SystemDacpacsLocation=${buildDirPath}`;
|
||||
if (utils.getAzdataApi()) {
|
||||
if (sqlProjStyle === mssql.ProjectType.SdkStyle) {
|
||||
return ` build ${projectPath} /p:NetCoreBuild=true /p:SystemDacpacsLocation=${buildDirPath}`;
|
||||
} else {
|
||||
return ` build ${projectPath} /p:NetCoreBuild=true /p:NETCoreTargetsPath=${buildDirPath} /p:SystemDacpacsLocation=${buildDirPath}`;
|
||||
}
|
||||
} else {
|
||||
return ` build ${projectPath} /p:NetCoreBuild=true /p:NETCoreTargetsPath=${buildDirPath} /p:SystemDacpacsLocation=${buildDirPath}`;
|
||||
if (sqlProjStyle === vscodeMssql.ProjectType.SdkStyle) {
|
||||
return ` build ${projectPath} /p:NetCoreBuild=true /p:SystemDacpacsLocation=${buildDirPath}`;
|
||||
} else {
|
||||
return ` build ${projectPath} /p:NetCoreBuild=true /p:NETCoreTargetsPath=${buildDirPath} /p:SystemDacpacsLocation=${buildDirPath}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user