* use glob to get files for new style msbuild sdk sqlproj
* add tests
* cleanup
* fix test
* don't show bin and obj files and folders
* handle other glob patterns
* fix duplicate entries getting added for glob patterns in project's folder
* don't show SSDT update warning for new style projects
* update strings
* add checks for the 2 other ways to specify msbuild sdk
* add link to docs on how to use project sdk
Co-authored-by: Kim Santiago <kisantia@Kims-MacBook-Pro.local>
* Expose default database collation through 'sql-database-projects' extension API.
For the purpose of schema conversion we would need to know whether target database is configured as CI or CS. This will be used to produce a warning, if we detect a case-sensitive identifier, but database is configured as CI. In order to support this scenario we need to access `<DefaultCollation/>` property of the project.
This change adds new method to the `ISqlProject` interface that allows to read the value of the project property. There already was similar method for the SQL version/platform (`<DSP/>` property) and while working on the change, I took an opportunity to refactor the way project properties are extracted from the XML. Original code was hardcoded in the `getProjectTargetVersion` and I extracted it into separate `evaluateProjectPropertyValue` helper, that can be used in the future by any getter or access method that is supposed to return a value of the single property. This also allows us to improve the way properties are retrieved from the XML. Today the logic is very rudimentary - we read the first matching XML element with the required name. This is not correct as it does not verify the parent to be `<PropertyGroup/>`, neither it evaluates the `Condition` attributes nor property value itself. I did not invest in this, but added a TODO there explaining that the method may not perform as expected.
After the helper method was added, I updated the existing `getProjectTargetVersion` method to leverage it. The only complication here was the error throwing logic, as it was using custom error message. I preserved that, as there were tests verifying it already. For the new accessor method I did not introduce a special error message and rely on generic one I defined for use within the helper method. Additionally, for the collation we return default value of `SQL_Latin1_General_CP1_CI_AS`, if project does not have the property defined. This is what SSDT for Visual Studio shows in the UI when property is missing and I decided to align with that.
Finally, I added tests for both - original `getProjectTargetVersion` and new collation extraction method to make sure they work as expected. While working on the tests, I've noticed complaints that some rejected promises were not awaited. I added missing `await`s.
* Added Tools Service call for ValidateStreamingJob
* Partial addition of ESJ
* adding test mocks
* Validation working
* Modifying command visibility logic to submatch ESJs in addition to files
* Changed string literal to constant, corrected attribute order
* Added tests
* correcting casing that's causing test failures on linux
* Swapping Thenable for Promise
* excluded validate from command palette
* Update Open Project to display pre-post deployment scripts in the project tree
* Address comments
* Fixed tests
* Update nonDeployScripts to noneDeployScripts and throw a warning message instead of informational message for prePostDeployCount
* add support for AAD interactive for project data sources
* fix whitespace
* remove warning message
* choose azureMFA if a connection string has both integrated security=true and authentication=active directory interactive
* first changes for showing project references
* add tests
* fix interface and formatting
* add try so that project still gets loaded even if dependency project loading fails
* use instanceof
* add circular reference error
* allow relative paths in project file outside of project folder
* Adding some tests
* Adding error string to loc strings
* Fixed test
* fix error message
* PR comments and some more fixes
* initial changes for reading connection from profile
* connection string can now be read from publish.xml
* fix build errors and update test
* move publish profile tests to their own file
* cleanup
* update message
* fix string
* remove apiWrapper
* load database name from profile.xml
* load sqlcmd variables from profile
* Add warning text
* add tests
* fix file filter for windows
* add comments
* show SQLCMD variables in a table
* reset dialog before testing readPublishProfile callback
* add system database reference for VS
* a few fixes
* update tests
* update tests
* fix tests after merge
* addressing comment to make logic a little more clear
* fix replacing SSDT reference name in tree
* Adding reading SqlCmdVars from project file
* organized apiWrapper, added calls
* Adding test to confirm deployment/script gen profiles with sqlcmd vars
* convert system database references from SSDT
* remove empty ItemGroup if no other database references
* fix baseline files
* also update sqlproj if system database references were added in SSDT since the sqlproj got updated with ADS imports
* undo change
* move updating system db references out of updateProjectForRoundTrip()
* update test to have an already updated system db ref
* add clean target after merge from master
* add await
* addressing comments
* add database references to same itemgroup
* show database references in tree
* update tests
* refresh project tree after a reference is added
* addressing comments
* add validation
* Add test
* sort imports
* add dacpacs
* able to add reference to appropriate master dacpac
* able to add reference to a dacpac
* Add a few tests
* fix tests
* fix wording
* fix adding reference to same database
* add project tests
* fix test for windows
* addressing comments
* Adding another test
* update tests
* fix build error
* Test code for round tripping feature
* Fixed tests. Edited updateImportedTargetsToProjFile method to push newly added import target to the list.
* Added couple more tests
* Addressed comment
* Initial changes for Import database as new project
* Functionally complete code
* Initial changes for Import database as new project
* Functionally complete code
* Resolved conflicts with latest changes. Also did some code refactoring.
* Addressed comments. Added unit tests.
* Addressed comments
* Moved ExtractTarget enum from azdata to mssql
* Addressed comments
* Fixed indentation in project templates