Commit Graph

58 Commits

Author SHA1 Message Date
Alex Ma
993b094db9 Localization added to sqlservicetools (#1216)
* added other languages to ServiceLayer

* fixed travis and appveyor yaml, added other languages for localization

* added spanish and german strings to credentialslocalization, also WIP for coreservices test

* added WIP localization test for CoreServices

* Removed unit test for coreservices, need to work on those later.

* restored travis and appveyor

* added kusto string resource localization test

* added localization test and locale change for SqlToolsCredentials

* added locale command options to ResourceProvider

* revert resourceprovider test

* Localized SqlTools.Credentials

* added hosting localization

* replaced new with translation to be consistent with main service layer

* reverted external changes as it is unnecessary

* Translated ManagedBatchParser

* test culture value

* test culture change

* temporarily comment out service layer command options

* returned sr.cs

* temporarily remove bad tests

* restored tests and allowed for SR culture to change for dependencies (for future testing)

* localization for resourceprovider components added.

* Set LocaleSetter to public and also removed InternalsVisible for Kusto, Credentials and ResourceProvider

* removed unnecessary changes

* Removed CredentialsCommandOptions

* renamed pt-BR to pt-br

* Rename sr.pt-BR.xlf.template to sr.pt-br.xlf.template

* Rename src/Microsoft.SqlTools.ServiceLayer/Localization/LCL/pt-BR/sr.resx.lcl to src/Microsoft.SqlTools.ServiceLayer/Localization/LCL/pt-br/sr.resx.lcl

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* Rename sr.pt-BR.xlf to sr.pt-br.xlf

* Rename sr.pt-BR.resx to sr.pt-br.resx

* restored newlines

* Update sr.pt-br.xlf.template

Removed newline

* removed newline

* fixing newlines for consistency

* removed unnecessary newline
2021-06-10 15:50:53 -07:00
Alex Ma
fefcab1c04 Added new String Resource Tool to fix issue (#1129) 2020-12-01 11:49:31 -08:00
David Shiflet
79e81a69b2 Add an ADO yaml file for integration tests (#1035)
* enable code coverage for ADO test run

* fix debugtype default

* use file name instead of guid

* use wildcard for test dll name
2020-08-02 15:05:17 -04:00
Soheil Alizadeh
887a499d2b Update Infrastructure (#961)
* Update form .NET Core 2.2 to .NET Core 3.1

- Global variable for projects
- Change TFMs from netcoreapp2.2 to netcoreapp3.1
- Update global.json
- Update build.json
- Remove direct framework cake TestCore task
- Update travis dotnet version
- Update azure pipline file
- Update vscode launch.json

* Add Central Package Management

* Fix xUnit Breaking Change for MemberData type

* Fix xUnit breaking change for duplicate test method name

* Fix Rang/Index type conflict with System.Rang/Index

* Update vscode tasks.json

* Change serviceHostExecutable path in ServiceTestDriver.cs

* Downgrade SDK version (https://github.com/appveyor/ci/issues/3440)

- Appveyor hasn't installed latest SDK therefore I downgrade it until they install it.

* Dump Microsoft.SqlServer.DACFx
2020-06-12 11:44:18 -07:00
Amir Omidi
e3f1789f18 Enable arm builds (#955) 2020-05-01 15:17:27 -07:00
Charles Gagnon
0a53ff9ff7 Update SMO to latest release (#943) 2020-04-14 08:45:51 -07:00
Aditya Bist
005457813d fix build breaks (#924) 2020-02-26 12:35:26 -08:00
Karl Burtram
427f0c11e8 Bump SMO and SqlClient to pickup Microsoft.Data.SqlClient fixes (#894)
* Revert "Revert to SMO with older SQLClient driver (#889)"

This reverts commit b763abae47.

* Bump SMO and SqlClient
2019-11-22 17:17:21 -08:00
Karl Burtram
b763abae47 Revert to SMO with older SQLClient driver (#889)
* Revert "Update SMO (#875)"

This reverts commit 96593d66e3.

* Revert "Switch Tools Service to new SMO and Microsoft.Data.SqlClient driver (#865)"

This reverts commit 9d140b53f3.

* Bump SMO to 160.1910315.0-preview
2019-11-04 13:00:45 -08:00
David Shiflet
9d140b53f3 Switch Tools Service to new SMO and Microsoft.Data.SqlClient driver (#865)
* switch to ambient props and targets files

* build against Microsoft.Data.SqlClient

* build tests

* fix test bug

* temporarily add SMO nuget to the repo

* update to released Microsoft.Data package
2019-09-17 17:51:19 -04:00
Karl Burtram
e261d77bb8 Fix "Save to CSV" CodePages assembly version mismatch (#790)
* Fix "Save to CSV" CodePages assembly version mismatch

* Add comment to delete packagereference once moving off preview version
2019-03-26 18:34:28 -07:00
Karl Burtram
0fd98df79b Update SqlClient to 4.6.0 (#761) 2019-01-07 16:22:35 -08:00
kisantia
d5fd968b3c DacFx import/export (#728)
Adding DacFx import/export/deploy/extract functionality
2018-11-27 16:10:46 -08:00
Matt Irvine
a1ab9aa650 Use consistent version of SqlClient (#740) 2018-11-16 12:08:57 -08:00
Karl Burtram
df023da0ba Revert "Rollback SMO to latest 14.0 version (#722)" (#723)
This reverts commit 407e9feb40.
2018-10-30 17:20:25 -07:00
Karl Burtram
407e9feb40 Rollback SMO to latest 14.0 version (#722)
* Rollback SMO to latest 14.0 version

* Add back nunit package reference
2018-10-30 12:13:23 -07:00
Karl Burtram
2b6eeb19ab Update references to use non preview references (#718) 2018-10-24 17:23:23 -07:00
Karl Burtram
a241a4510b Bump .Net Core SDK to 2.2.100 Preview (#715)
* Bump .Net Core SDK to 2.2

* Update travis file

* Try to fix broken AppVeyor code coverage
2018-10-22 15:54:17 -07:00
Arvind Ranasaria
1ef70ef259 Bug fix for https://github.com/Microsoft/azuredatastudio/issues/2923 and misc other fixes (#711) 2018-10-19 13:25:18 -07:00
David Shiflet
f99061866c Upgrade SMO to 150 preview (#701)
* Switch to the unified SMO NuGet so all binaries are strong named and signed.

* use one AssemblyLoader instance for all loads

* Revert "use one AssemblyLoader instance for all loads"

This reverts commit 48c59ffd5c57152de281c87acdbcad7ddf7ab760.

* Stop creating multiple AssemblyLoadContext objects during composition, per https://github.com/dotnet/coreclr/issues/19632

* restore high entropyva property

* Improve the comment

* Update SMO to 150 and fix scripting for objects with a single quote in their name.

* restore newtonsoft reference
2018-10-03 18:33:40 -04:00
ranasaria
efd0aaaab5 Fix to not load microsoftsqltoolsservicelayer.dll in MicrosoftSqlToolsCredentials.exe (#699) 2018-09-25 18:09:06 -07:00
ranasaria
335e9fb38c Logging for ga (#698)
Adding a robustness change to call close on logger before process exit.
Also adding a designer.cs file needed by a script csproj that got missed out in previous checkin due to .gitignore entry.
2018-09-25 17:26:22 -07:00
ranasaria
09652cccd1 Enhanced Logging for sqltoolsservice (#695)
This change modifies the logging framework within sqltoolservice.
Moves away from custom Logger object to start using .Net tracing framework. It supports for the static Trace and TraceSource way of logging. For all new code it is recommend that we log the log messages using the existing static Logger class, while the code changes will continue to route the older Trace.Write* calls from the process to same log listeners (and thus the log targets) as used by the Logger class. Thus tracing in SMO code that uses Trace.Write* methods gets routed to the same file as the messages from rest of SQLTools Service code.
Make changes to start using .Net Frameworks codebase for all logging to unify our logging story.
Allows parameter to set tracingLevel filters that controls what kinds of message make it to the log file.
Allows a parameter to set a specific log file name so if these gets set by external code (the UI code using the tools service for example) then the external code is aware of the current log file in use.
Adding unittests to test out the existing and improved logging capabilities.


Sequences of checkins in development branch:
* Saving v1 of logging to prepare for code review. Minor cleanup and some end to end testing still remains
* Removing local launchSettings.json files
* added support for lazy listener to sqltoolsloglistener and removed incorrect changes to comments across files in previous checkin
* Converting time to local time when writing entries to the log
* move the hosting.v2 to new .net based logging code
* removing *.dgml files and addding them to .gitignore
* fixing typo of defaultTraceSource
* Addressing pull request feedback
* Adding a test to verify logging from SMO codebase
* propogating changes to v1 sqltools.hosting commandoptions.cs to the v2 version
* Fixing comments on start and stop callstack methods and whitespaces
* Commenting a test that got uncommented by mistake
* addding .gitattributes file as .sql file was observed to be misconstrued as a binary file
2018-09-24 23:55:59 -07:00
Karl Burtram
066be2f46f Revert "Switch to the unified SMO NuGet" (#686)
* Revert "fixed perf tests and added more scenarios (#683)"

This reverts commit aa2b30f486.

* Revert "Switch to the unified SMO NuGet so all binaries are strong named and signed. (#682)"

This reverts commit 69961992bb.
2018-09-04 11:01:44 -07:00
David Shiflet
69961992bb Switch to the unified SMO NuGet so all binaries are strong named and signed. (#682) 2018-08-20 08:27:52 -04:00
David Shiflet
5cdab53da8 Upgrade SMO packages to fix issue with scripting tables (#678)
* Upgrade SMO packages to fix issue with scripting tables when Script Dependencies is true on the script options.

* use linux style import with case matching file name
2018-08-09 08:11:18 -04:00
David Shiflet
0b4228a7d9 Update Sql Management Objects to latest version (#666) 2018-07-27 17:25:16 -04:00
Alan Ren
45ca7fc071 SMO Refresh with SSMS 17.7 binaries (#616) 2018-05-08 13:35:58 -07:00
Cory Rivera
dca33d768d Bump System.Data.SqlClient package version used in SqlTools projects. (#608) 2018-04-30 16:57:07 -07:00
Karl Burtram
e73a8ddca6 Update projects for netcoreapp2.1 SDK (#603)
* Update projects for netcoreapp2.1 SDK

* Fix whitespace

* Fix issue in Nuget config file
2018-04-23 17:06:52 -07:00
Leila Lali
d20215cb19 added script as alter (#564)
* added script as alter
2017-12-07 12:49:38 -08:00
Benjamin Russell
64133d929e Edit Data: Better Formatting Errors (#562)
* Refactoring sql script formatting helpers into To and From helpers

* Updates to make error messages for formatting errors more useful

* Fixing dumb breaks in unit tests

* Addressing comments from PR

* Updates to the SR files...
2017-12-05 17:00:13 -08:00
Benjamin Russell
2190039df2 Edit Data: Create Row with Nullable Columns (#553)
* WIP

* All the new RowCreate tests are working

* Fixing a couple bugs with the row delete and row update tests

* Regenerating localization files

* Fixing multiple iteration in tests
2017-11-28 14:59:48 -08:00
Saurabh Singh
4c329921c7 Update smo (#530)
* update the version in CSPROJ

* Add the updated SMO package
2017-10-26 10:55:04 -07:00
Benjamin Russell
e9bc97e290 Edit Data: Better errors for possible truncation (#514)
* Fix to make sql exceptions surface properly to user (with important notes!)

* Adding support for detecting column size issues when updating a cell

* Adding unit tests for the exception on read scenario
2017-10-21 11:08:40 -07:00
Aditya Bist
49f0221dc8 updated smo nuget package with latest bits (#508)
* updated smo nuget package with latest bits

* added new nupkg

* fixed peek definition test

* fixed batch parser wrapper tests
2017-10-19 18:02:47 -07:00
Ronald Quan
0ab1dd4c55 Adding linux-x64 runtime id to build script and .csprojs. (#494) 2017-10-12 16:10:19 -07:00
Kevin Cunnane
7acc668c04 Create Firewall Rule support with a simple Resource Provider implementation
Implementation of the resource provider APIs in order to support Create Firewall Rule. Provides definition for a ResourceProvider and Authentication service. The ResourceProvider supports firewall rules for now, and since authentication is routed through that method it will call into the auth service to set up the current account to be used.

Additional notes:
- Fixed deserialization by adding an Accept header. This shouldn't be necessary, but for some reason the firewall rule defaults to XML without this
- Use generic server list and parse the ID to get the resource group, avoiding a large number of extra calls for each RG
- Errors now include error message from the API
2017-10-09 15:45:33 -07:00
Kevin Cunnane
ac64ac063b Port Azure code from SSDT to the tools service (#477)
Porting of the vast majority of Azure-related code from SSDT. This is very large, so I want to put this out as one large "lift and shift" PR before I do the tools-service specific JSON-RPC service handlers, connect a new account handler (as the code to get necessary info from accounts and subscriptions isn't fully complete) and add tests over these

**What's in this PR**:

- Created 3 new projects:
  - Microsoft.SqlTools.ResourceProvider will host the executable that accepts requests for Azure-related actions over the JSON-RPC protocol. This must be separate from other DLLs since a direct dependency on the Azure SDK DLLs fails (they're NetStandard 1.4 and you can't reference them if you have RuntimeIdentifiers in your .csproj file)
  - Microsoft.SqlTools.ResourceProvider.Core is where all the main business logic is, including definitions and logic on how to navigate over resources and create firewall rules, etc.
  - Microsoft.SqlTools.ResourceProvider.DefaultImpl is the actual Azure implementation of the resource provider APIs. The reason for separating this is to support eventual integration back into other tools (since their Azure and Identity services will be different).
- Implemented the AzureResourceManager that connects to Azure via ARM APIs and handles creating firewall rule and querying databases. The dependent DLLs have had major breaking changes, so will need additional verification to ensure this works as expected
- Ported the unit tests for all code that was not a viewmodel. Viewmodel test code will be ported in a future update as we plumb through a service-equivalent to these. Also, the DependencyManager code which has overlap with our service provider code is commented out. Will work to uncomment in a future update as it has value to test some scenarios

**What's not in this PR**:
- Identity Services. We currently just have a stub for the interface, and even that will likely change a little
- anything JSON-RPC or registered service related. These will be adapted from the viewmodels and added in a separate PR
2017-10-04 12:37:20 -07:00
Aditya Bist
e7756b0bf1 Task/script refactor (#446)
* scripting working with race conditions

* new service works with no race conditions

* use new scripting service and commented out tests

* refactored peek definition to use mssql-scripter

* fixed peek definition tests

* removed auto gen comment

* fixed peek definition highlighting bug

* made scripting async and fixed event handlers

* fixed tests (without cancel and plan notifs)

* removed dead code

* added nuget package

* CR comments + select script service implementation

* minor fixes and added test

* CR comments and script select

* added unit tests

* code review comments and cleanup
2017-10-02 12:02:43 -07:00
Karl Burtram
84ea045572 XEvent Profiler initial event handlers (#456)
* Bump SMO to 140.2.5 to pick-up private XEvent binaries

* Pick up SMO binaries from the build lab

* Add ProfilerService class placeholder

* Update SMO nuget package to include DB Scoped XEvents

* Stage changes

* Stage changes

* Update SMO to use RTM dependencies and remove separate SqlScript package

* Stage changes

* Iterate on profiler service

* Fix post-merge break in localization

* More refactoring

* Continue iterating on profiler

* Add test profiler listener

* Address a couple of the code review feedback

* Fix AppVeyor build break

* Use self-cleaning test file
2017-09-12 14:08:50 -07:00
Henry Phan
784f4c5d05 Feature/serialization exe (#442)
* Initial changes to have serialization generate its own .exe

* Removed additional project from sln file

* remove all references to removed temporary project

* Moved shared contracts into own dll and fixed imports. Addressed PR comments

* Undid having a separate contracts project since that'll be a task for later on. Moved dbcellvalue and saveresultsrequest to Hosting, where they will be imported and shared by the service layer and serialization projects

* Switched backslashes in project reference in csproj file to forward slashes for consistency

* Moved necessary contracts back to service layer. Refactored CommandOptions to reduce code duplication. Addressed miscellaneous PR suggestions

* Accidentally left these files out of previous commit

* Initialized loggers for serialization and credentials with the logging directory provided by the cmd line arg, if there is one

* Changed default log directory paths for serialization and credentials. Removed unnecessary cast and added a copyright

* Changed name of generated executable for serialization service

* removed unnecessary object cast

* removing unnecessary imports and addressing other PR comments
2017-09-05 16:21:42 -07:00
Leila Lali
22ccac98ae creating one package which includes sqltoolsservice and credential service (#444)
* creating one package which includes sqltoolsservice and credential service

* adding logDir arg to credentials program
2017-09-01 12:21:30 -07:00
Karl Burtram
4e9ff42dfc Update to SMO built with .Net 2.0 RTM SDK (#437)
* Pick up .Net 2 RTM SMO dependencies

* Add missing NUPKG files

* Remove preview framework nuget packages
2017-08-16 16:08:03 -07:00
Karl Burtram
354d702d6f Update SMO to pickup latest fixes (#419) 2017-07-19 13:29:42 -07:00
Leila Lali
05775a6089 Feature/restore db (#403)
* Added service handlers for restore database operations
2017-07-10 17:28:57 -07:00
Karl Burtram
5dcc82c3d6 Upgrade to net core 2.0 (#356)
* Initial .net core 2.0 conversion

* Convert a few more projects to .net core 2.0

* Convert a few more projects to .net core 2.0

* Fix build.cmd errors

* Add mising nuget package

* Remove dead code

* Add checked in references to workaround nuget package issues

* Update SLN file to refer to correct csproj files

* Rename applications to workaround .net core tooling bug

* Update nuget package with SQL Parser changes

* Add PreserveCompliationContext to avoid MEF bug

* Update smo version to pickup .net core 2 changes

* Pickup latest SMO changes to fix merge break

* Actually pickup correct SMO binaries

* Add support for SLES 12.2

* Fix break running archiving on Linux

* Revert "Add support for SLES 12.2"

This reverts commit 95cdb6d0e35a425be5c0081345d214079cbdc3db.

* Update to latest SMO build

* Install .Net Core 2 during install phase

* Move .Net Core install

* Try to reference dotnet.exe directly

* Fix code coverage script for CSPROJ instead of project.json

* Turn off test that is unreliable in AppVeyor builds.

* Fix appveyor.yml line feed.

* Turn off another flaky test failing in AppVeyor
2017-07-05 16:18:14 -07:00
Brian O'Neill
7625c8d83d Add command line option to specify the logging directory (#336)
Two changes in this PR:
* Add a --log-dir command line parameter and fix command line parsing
* Fix command line parsing where arguments with parameter were parsed incorrectly
2017-05-10 08:55:46 -07:00
Henry Phan
f50f30b493 Changes to sqltoolsservice to allow empty password for SqlLogin (#333)
* Initial changes to allow empty passwords

* Added in empty password test

* Modifying test to work after my changes.
2017-05-02 10:17:44 -07:00
Aditya Bist
06eddd57f4 Task/batch parser wrapper tests (#314)
* added more batch parser tests

* fixed merge conflicts

* change debug type to portable

* fixed imports according to review
2017-04-21 11:59:20 -07:00