mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Updating SQL Projects nuget dependency (#2253)
* Updating SQL Projects nuget dependency * Bumping nuget version * Adding missed swapover
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
<PackageReference Update="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="1.1.1" />
|
<PackageReference Update="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="1.1.1" />
|
||||||
<PackageReference Update="Microsoft.SqlServer.Management.SmoMetadataProvider" Version="170.18.0" />
|
<PackageReference Update="Microsoft.SqlServer.Management.SmoMetadataProvider" Version="170.18.0" />
|
||||||
<PackageReference Update="Microsoft.SqlServer.DacFx" Version="162.1.153-preview" />
|
<PackageReference Update="Microsoft.SqlServer.DacFx" Version="162.1.153-preview" />
|
||||||
<PackageReference Update="Microsoft.SqlServer.DacFx.Projects" Version="0.1.14-preview" />
|
<PackageReference Update="Microsoft.SqlServer.DacFx.Projects" Version="0.2.2-preview" />
|
||||||
<PackageReference Update="Microsoft.Azure.Kusto.Data" Version="9.0.4" />
|
<PackageReference Update="Microsoft.Azure.Kusto.Data" Version="9.0.4" />
|
||||||
<PackageReference Update="Microsoft.Azure.Kusto.Language" Version="9.0.4" />
|
<PackageReference Update="Microsoft.Azure.Kusto.Language" Version="9.0.4" />
|
||||||
<PackageReference Update="Microsoft.SqlServer.Assessment" Version="[1.1.17]" />
|
<PackageReference Update="Microsoft.SqlServer.Assessment" Version="[1.1.17]" />
|
||||||
|
|||||||
@@ -11388,6 +11388,11 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
return Keys.GetString(Keys.PropertyNotInitialized, propertyName);
|
return Keys.GetString(Keys.PropertyNotInitialized, propertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string InvalidDspFormatError(string dsp)
|
||||||
|
{
|
||||||
|
return Keys.GetString(Keys.InvalidDspFormatError, dsp);
|
||||||
|
}
|
||||||
|
|
||||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Keys
|
public class Keys
|
||||||
{
|
{
|
||||||
@@ -15758,6 +15763,9 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
public const string PropertyNotInitialized = "PropertyNotInitialized";
|
public const string PropertyNotInitialized = "PropertyNotInitialized";
|
||||||
|
|
||||||
|
|
||||||
|
public const string InvalidDspFormatError = "InvalidDspFormatError";
|
||||||
|
|
||||||
|
|
||||||
private Keys()
|
private Keys()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|||||||
@@ -6028,4 +6028,9 @@ The Query Processor estimates that implementing the following index could improv
|
|||||||
<comment>.
|
<comment>.
|
||||||
Parameters: 0 - propertyName (string) </comment>
|
Parameters: 0 - propertyName (string) </comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="InvalidDspFormatError" xml:space="preserve">
|
||||||
|
<value>Invalid value for Database Schema Provider: '{0}'; expected to be in the form 'Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider'.</value>
|
||||||
|
<comment>.
|
||||||
|
Parameters: 0 - dsp (string) </comment>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
@@ -2426,5 +2426,9 @@ HyperscaleAzureEdition = Hyperscale
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# Server Properties
|
# Server Properties
|
||||||
|
|
||||||
############################################################################
|
PropertyNotInitialized(string propertyName) = Property '{0}' was set before initialization.
|
||||||
PropertyNotInitialized(string propertyName) = Property '{0}' was set before initialization.
|
|
||||||
|
#############################################################################
|
||||||
|
# SqlProjects
|
||||||
|
|
||||||
|
InvalidDspFormatError(string dsp) = Invalid value for Database Schema Provider: '{0}'; expected to be in the form 'Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider'.
|
||||||
@@ -7364,6 +7364,12 @@ The Query Processor estimates that implementing the following index could improv
|
|||||||
<target state="new">7 Days</target>
|
<target state="new">7 Days</target>
|
||||||
<note></note>
|
<note></note>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="InvalidDspFormatError">
|
||||||
|
<source>Invalid value for Database Schema Provider: '{0}'; expected to be in the form 'Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider'.</source>
|
||||||
|
<target state="new">Invalid value for Database Schema Provider: '{0}'; expected to be in the form 'Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider'.</target>
|
||||||
|
<note>.
|
||||||
|
Parameters: 0 - dsp (string) </note>
|
||||||
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
@@ -117,7 +117,14 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
|||||||
{
|
{
|
||||||
await RunWithErrorHandling(async () =>
|
await RunWithErrorHandling(async () =>
|
||||||
{
|
{
|
||||||
await SqlProject.CreateProjectAsync(requestParams.ProjectUri, new SqlServer.Dac.Projects.CreateSqlProjectParams() { ProjectType = requestParams.SqlProjectType, DspVersion = requestParams.DatabaseSchemaProvider });
|
SqlServer.Dac.Projects.CreateSqlProjectParams createParams = new()
|
||||||
|
{
|
||||||
|
ProjectType = requestParams.SqlProjectType,
|
||||||
|
TargetPlatform = requestParams.DatabaseSchemaProvider == null ? null : Utilities.DatabaseSchemaProviderToSqlPlatform(requestParams.DatabaseSchemaProvider),
|
||||||
|
BuildSdkVersion = requestParams.BuildSdkVersion
|
||||||
|
};
|
||||||
|
|
||||||
|
await SqlProject.CreateProjectAsync(requestParams.ProjectUri, createParams);
|
||||||
this.GetProject(requestParams.ProjectUri); // load into the cache
|
this.GetProject(requestParams.ProjectUri); // load into the cache
|
||||||
}, requestContext);
|
}, requestContext);
|
||||||
}
|
}
|
||||||
@@ -169,7 +176,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SqlProjects
|
|||||||
|
|
||||||
internal async Task HandleSetDatabaseSchemaProviderRequest(SetDatabaseSchemaProviderParams requestParams, RequestContext<ResultStatus> requestContext)
|
internal async Task HandleSetDatabaseSchemaProviderRequest(SetDatabaseSchemaProviderParams requestParams, RequestContext<ResultStatus> requestContext)
|
||||||
{
|
{
|
||||||
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri, onlyLoadProperties: true).Properties.DatabaseSchemaProvider = requestParams.DatabaseSchemaProvider, requestContext);
|
await RunWithErrorHandling(() => GetProject(requestParams.ProjectUri, onlyLoadProperties: true).Properties.TargetSqlPlatform = Utilities.DatabaseSchemaProviderToSqlPlatform(requestParams.DatabaseSchemaProvider), requestContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.Data.Tools.Schema.SchemaModel;
|
||||||
using Microsoft.SqlServer.Dac.Projects;
|
using Microsoft.SqlServer.Dac.Projects;
|
||||||
using Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility;
|
using Microsoft.SqlTools.ServiceLayer.IntegrationTests.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlProjects;
|
using Microsoft.SqlTools.ServiceLayer.SqlProjects;
|
||||||
@@ -62,13 +63,17 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.SqlProjects
|
|||||||
await service.HandleCreateSqlProjectRequest(new ServiceLayer.SqlProjects.Contracts.CreateSqlProjectParams()
|
await service.HandleCreateSqlProjectRequest(new ServiceLayer.SqlProjects.Contracts.CreateSqlProjectParams()
|
||||||
{
|
{
|
||||||
ProjectUri = sdkProjectUri,
|
ProjectUri = sdkProjectUri,
|
||||||
SqlProjectType = ProjectType.SdkStyle
|
SqlProjectType = ProjectType.SdkStyle,
|
||||||
|
DatabaseSchemaProvider = "Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider", // non-default DSP
|
||||||
|
BuildSdkVersion = "0.1.7-preview" // non-default (old) SDK version
|
||||||
}, requestMock.Object);
|
}, requestMock.Object);
|
||||||
|
|
||||||
requestMock.AssertSuccess(nameof(service.HandleCreateSqlProjectRequest), "SDK");
|
requestMock.AssertSuccess(nameof(service.HandleCreateSqlProjectRequest), "SDK");
|
||||||
Assert.AreEqual(1, service.Projects.Count, "Number of loaded projects after creating SDK not as expected");
|
Assert.AreEqual(1, service.Projects.Count, "Number of loaded projects after creating SDK not as expected");
|
||||||
Assert.IsTrue(service.Projects.ContainsKey(sdkProjectUri), "Loaded project list expected to contain SDK project URI");
|
Assert.IsTrue(service.Projects.ContainsKey(sdkProjectUri), "Loaded project list expected to contain SDK project URI");
|
||||||
Assert.AreEqual(ProjectType.SdkStyle, service.Projects[sdkProjectUri].SqlProjStyle, "SqlProj style expected to be SDK");
|
Assert.AreEqual(ProjectType.SdkStyle, service.Projects[sdkProjectUri].SqlProjStyle, "SqlProj style expected to be SDK");
|
||||||
|
Assert.AreEqual(SqlPlatforms.SqlAzureV12, service.Projects[sdkProjectUri].Properties.TargetSqlPlatform, "Target SQL platform expected to be Azure");
|
||||||
|
Assert.AreEqual("0.1.7-preview", service.Projects[sdkProjectUri].MicrosoftBuildSqlSdkVersion, "SQL SDK version expected to be 0.1.7-preview");
|
||||||
|
|
||||||
// Validate creating Legacy-style project
|
// Validate creating Legacy-style project
|
||||||
requestMock = new();
|
requestMock = new();
|
||||||
|
|||||||
Reference in New Issue
Block a user