microsoft / DacFx

DacFx, SqlPackage, and other SQL development libraries enable declarative database development and database portability across SQL versions and environments. Share feedback here on dacpacs, bacpacs, and SQL projects.
https://aka.ms/sqlpackage-ref
MIT License
307 stars 18 forks source link

when TargetScripts tag missing, exception message error is not correct #111

Open hj1000 opened 2 years ago

hj1000 commented 2 years ago

Steps to Reproduce:

  1. make scmp file without TargetScripts tag

    \ \xxx.sqlproj \250 \ \"

  2. exception message is "always Dsp tag is none"

  3. i think maybe this code block's typing mistake

    XmlNode xmlNode1 = parent.SelectSingleNode("ProjectFilePath"); XmlNode xmlNode2 = parent.SelectSingleNode("TargetScripts"); XmlNode xmlNode3 = parent.SelectSingleNode("Dsp"); if (xmlNode1 == null) throw SerializationException.NewMissingChildElementSerializationException("ProjectFilePath", parent); if (xmlNode2 == null) throw SerializationException.NewMissingChildElementSerializationException("Dsp", parent); if (xmlNode3 == null) throw SerializationException.NewMissingChildElementSerializationException("Dsp", parent);

Did this occur in prior versions? If not - which version(s) did it work in?

(DacFx/SqlPackage/SSMS/Azure Data Studio)

chlafreniere commented 2 years ago

@hj1000 which product are you using where you're running into this issue? SSDT, or Azure Data Studio?

hj1000 commented 2 years ago

it was occurred when directly call nuget package's api. like as below(C#)

        var comparison = new SchemaComparison("[scmp file's path]");
        var comparisonResult = comparison.Compare();