Revert "Applying Changes to SQL Database Projects and Using Projects in Comparison (#1282)" (#1284)

This reverts commit 6acda6e1e6.

committedcda6e1e6ed5ff4fddb65b954951ff987fa01c06acda6e1e6ed5ff4fddb65b954951ff987fa01c0:
This commit is contained in:
Benjin Dubishar
2021-11-05 20:25:09 -04:00
committed by GitHub
parent 6acda6e1e6
commit 8234dcf215
12 changed files with 102 additions and 1035 deletions

View File

@@ -100,17 +100,13 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
{
SchemaCompareEndpointInfo endpointInfo = new SchemaCompareEndpointInfo();
// if the endpoint is a dacpac or a project we don't need to parse the xml
if (endpoint is SchemaCompareDacpacEndpoint dacpacEndpoint)
// if the endpoint is a dacpac we don't need to parse the xml
SchemaCompareDacpacEndpoint dacpacEndpoint = endpoint as SchemaCompareDacpacEndpoint;
if (dacpacEndpoint != null)
{
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
@@ -135,7 +131,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;
}