mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 17:24:26 -05:00
Applying Changes to SQL Database Projects and Using Projects in Comparison (#1282)
* passing initial testing * update local project from database * update local project * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * Bump .net version * PR feedback Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
This commit is contained in:
@@ -100,13 +100,17 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
||||
{
|
||||
SchemaCompareEndpointInfo endpointInfo = new SchemaCompareEndpointInfo();
|
||||
|
||||
// if the endpoint is a dacpac we don't need to parse the xml
|
||||
SchemaCompareDacpacEndpoint dacpacEndpoint = endpoint as SchemaCompareDacpacEndpoint;
|
||||
if (dacpacEndpoint != null)
|
||||
// if the endpoint is a dacpac or a project we don't need to parse the xml
|
||||
if (endpoint is SchemaCompareDacpacEndpoint dacpacEndpoint)
|
||||
{
|
||||
endpointInfo.EndpointType = SchemaCompareEndpointType.Dacpac;
|
||||
endpointInfo.PackageFilePath = dacpacEndpoint.FilePath;
|
||||
}
|
||||
else if (endpoint is SchemaCompareProjectEndpoint projectEndpoint)
|
||||
{
|
||||
endpointInfo.EndpointType = SchemaCompareEndpointType.Project;
|
||||
endpointInfo.ProjectFilePath = projectEndpoint.ProjectFilePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
// need to parse xml to get connection string of database
|
||||
@@ -131,7 +135,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ErrorMessage = string.Format(SR.OpenScmpConnectionBasedModelParsingError, ((SchemaCompareDatabaseEndpoint)endpoint).DatabaseName,e.Message);
|
||||
ErrorMessage = string.Format(SR.OpenScmpConnectionBasedModelParsingError, ((SchemaCompareDatabaseEndpoint)endpoint).DatabaseName, e.Message);
|
||||
Logger.Write(TraceEventType.Error, string.Format("Schema compare open scmp operation failed during xml parsing with exception {0}", e.Message));
|
||||
throw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user