Closed martinsmith123456 closed 5 years ago
Hi,
Break point will come into play then :)
Enjoy!
Thanks very much for the speedy reply.
I also came across another method I'll share in case anyone else finds useful.
Add a console app to the solution. -- To that add references to the various DataTools and Microsoft.SQLServer assemblies -- and add a project reference to AgileSqlClub.SqlPackageFilter
In the console app add the following code (the publish xml contains the AdditionalDeploymentContributors and AdditionalDeploymentContributorArguments)
var dacServices = new Microsoft.SqlServer.Dac.DacServices(connString);
var dacProfile = Microsoft.SqlServer.Dac.DacProfile.Load("my.publish.xml");
var dacPackage = Microsoft.SqlServer.Dac.DacPackage.Load(@"my.dacpac");
string x = dacServices.GenerateDeployScript(dacPackage, "MyDB", dacProfile.DeployOptions, null);
Run the console app in debug mode.
Regarding the issue itself I can see the problem. ShouldRemoveFromPlan is being passed an empty string as ObjectIdentifier name for unnamed constraints so things like schema checks based on this don't work - will see if I can find a nice way of solving this.
Hello,
I'd like to be able to step through the code in the filter as it is being called when generating a deploy script from a dacpac.
I assume you must have done this during development. If so what is the best way of doing this?
Martin
(PS: The issue I am looking into is one where I am seeing unnamed constraints being scripted for objects in a schema that should be ignored - I'll submit a pull request once I've got to the bottom of this)