We have a Visual Studio database project with a publish profile that produces different change scripts depending on whether I use Visual Studio's Generate Script option or SQL Package from the command-line:
- Visual Studio creates a 10,455KB file.
- SqlPackage creates an 8,835KB file using the following command:
SqlPackage /a:Script /sf:pub.dacpac /pr:pub.profile.xml
Any suggestions on how to observe the command-line VS uses to generate its script? Any ideas what the difference might be when both processes use the following publish profile?
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IncludeCompositeObjects>True</IncludeCompositeObjects>
<TargetDatabaseName>nrc_gateway</TargetDatabaseName>
<DeployScriptFileName>clm_model.publish.sql</DeployScriptFileName>
<BlockOnPossibleDataLoss>False</BlockOnPossibleDataLoss>
<ScriptDatabaseCompatibility>True</ScriptDatabaseCompatibility>
<ProfileVersionNumber>1</ProfileVersionNumber>
<DropDmlTriggersNotInSource>False</DropDmlTriggersNotInSource>
<DropIndexesNotInSource>False</DropIndexesNotInSource>
<TargetConnectionString>Data Source=.;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True</TargetConnectionString>
<AllowIncompatiblePlatform>True</AllowIncompatiblePlatform>
<DropConstraintsNotInSource>False</DropConstraintsNotInSource>
<DropExtendedPropertiesNotInSource>False</DropExtendedPropertiesNotInSource>
<VerifyDeployment>False</VerifyDeployment>
<BlockWhenDriftDetected>False</BlockWhenDriftDetected>
<RegisterDataTierApplication>False</RegisterDataTierApplication>
<IncludeTransactionalScripts>True</IncludeTransactionalScripts>
<ExcludeUsers>True</ExcludeUsers>
<ExcludeDatabaseRoles>False</ExcludeDatabaseRoles>
<DropObjectsNotInSource>False</DropObjectsNotInSource>
<DoNotDropAggregates>False</DoNotDropAggregates>
<DoNotDropApplicationRoles>False</DoNotDropApplicationRoles>
<DoNotDropAssemblies>False</DoNotDropAssemblies>
<DoNotDropAsymmetricKeys>False</DoNotDropAsymmetricKeys>
<DropPermissionsNotInSource>False</DropPermissionsNotInSource>
<GenerateSmartDefaults>True</GenerateSmartDefaults>
<ScriptNewConstraintValidation>True</ScriptNewConstraintValidation>
</PropertyGroup>
</Project>