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:
Benjin Dubishar
2021-11-04 21:36:59 -04:00
committed by GitHub
parent eda47bc0a4
commit 6acda6e1e6
12 changed files with 1036 additions and 103 deletions

View File

@@ -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;
}