mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Add AddNugetPackageReferenceRequest for sql projects (#22757)
* Add AddnugetPackageReferenceRequest for sql projects * update comment * fix whitespace
This commit is contained in:
@@ -77,6 +77,21 @@ export class SqlProjectsService extends BaseService implements mssql.ISqlProject
|
||||
return await this.runWithErrorHandling(contracts.AddSystemDatabaseReferenceRequest.type, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a nuget package database reference to a project
|
||||
* @param projectUri Absolute path of the project, including .sqlproj
|
||||
* @param packageName Name of the referenced nuget package
|
||||
* @param packageVersion Version of the referenced nuget package
|
||||
* @param suppressMissingDependencies Whether to suppress missing dependencies
|
||||
* @param databaseVariable SQLCMD variable name for specifying the other database this reference is to, if different from that of the current project
|
||||
* @param serverVariable SQLCMD variable name for specifying the other server this reference is to, if different from that of the current project. If this is set, DatabaseVariable must also be set.
|
||||
* @param databaseLiteral Literal name used to reference another database in the same server, if not using SQLCMD variables
|
||||
*/
|
||||
public async addNugetPackageReference(projectUri: string, packageName: string, packageVersion: string, suppressMissingDependencies: boolean, databaseVariable?: string, serverVariable?: string, databaseLiteral?: string): Promise<azdata.ResultStatus> {
|
||||
const params: contracts.AddNugetPackageReferenceParams = { projectUri: projectUri, packageName: packageName, packageVersion: packageVersion, suppressMissingDependencies: suppressMissingDependencies, databaseVariable: databaseVariable, serverVariable: serverVariable, databaseLiteral: databaseLiteral };
|
||||
return await this.runWithErrorHandling(contracts.AddNugetPackageReferenceRequest.type, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a database reference from a project
|
||||
* @param projectUri Absolute path of the project, including .sqlproj
|
||||
|
||||
Reference in New Issue
Block a user