mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 02:48:30 -05:00
Create project within folder (#11037)
This commit is contained in:
@@ -101,6 +101,12 @@ export class ProjectsController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new folder with the project name in the specified location, and places the new .sqlproj inside it
|
||||
* @param newProjName
|
||||
* @param folderUri
|
||||
* @param projectGuid
|
||||
*/
|
||||
public async createNewProject(newProjName: string, folderUri: Uri, projectGuid?: string): Promise<string> {
|
||||
if (projectGuid && !UUID.isUUID(projectGuid)) {
|
||||
throw new Error(`Specified GUID is invalid: '${projectGuid}'`);
|
||||
@@ -119,7 +125,7 @@ export class ProjectsController {
|
||||
newProjFileName += constants.sqlprojExtension;
|
||||
}
|
||||
|
||||
const newProjFilePath = path.join(folderUri.fsPath, newProjFileName);
|
||||
const newProjFilePath = path.join(folderUri.fsPath, path.parse(newProjFileName).name, newProjFileName);
|
||||
|
||||
let fileExists = false;
|
||||
try {
|
||||
|
||||
@@ -166,7 +166,7 @@ describe.skip('ProjectsController: project controller operations', function ():
|
||||
let profilePath = await testUtils.createTestFile(baselines.publishProfileBaseline, 'publishProfile.publish.xml');
|
||||
const projController = new ProjectsController(testContext.apiWrapper.object, new SqlDatabaseProjectTreeViewProvider());
|
||||
|
||||
let result = await projController.readPublishProfile(vscode.Uri.parse(profilePath));
|
||||
let result = await projController.readPublishProfile(vscode.Uri.file(profilePath));
|
||||
should(result.databaseName).equal('targetDb');
|
||||
should(Object.keys(result.sqlCmdVariables).length).equal(1);
|
||||
should(result.sqlCmdVariables['ProdDatabaseName']).equal('MyProdDatabase');
|
||||
|
||||
Reference in New Issue
Block a user