diff --git a/.travis.yml b/.travis.yml
index 4400307a..291b4abf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,7 @@ os:
# - osx
mono: none
-dotnet: 2.2
+dotnet: 3.1
# was dotnet: 2.2.100-preview3-009430
# safelist
diff --git a/.vscode/launch.json b/.vscode/launch.json
index aa1d453e..e6ab5c0d 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/src/Microsoft.SqlTools.ServiceLayer/bin/Debug/netcoreapp2.2/MicrosoftSqlToolsServiceLayer.dll",
+ "program": "${workspaceFolder}/src/Microsoft.SqlTools.ServiceLayer/bin/Debug/netcoreapp3.1/MicrosoftSqlToolsServiceLayer.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Microsoft.SqlTools.ServiceLayer",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 053e0f52..e344bc6c 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -7,7 +7,7 @@
"type": "process",
"args": [
"build",
- "${workspaceFolder}/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj"
+ "${workspaceFolder}/sqltoolsservice.sln"
],
"problemMatcher": "$msCompile"
}
diff --git a/Directory.Build.props b/Directory.Build.props
index 0bd5ee87..992a18d9 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,16 +1,6 @@
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- 160.2004021.0
- 1.1.1
- 11.0.1
- 150.4787.1-preview
true
true
-
-
-
-
-
diff --git a/Directory.Build.targets b/Directory.Build.targets
new file mode 100644
index 00000000..bb346042
--- /dev/null
+++ b/Directory.Build.targets
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/Packages.props b/Packages.props
new file mode 100644
index 00000000..b80f0e38
--- /dev/null
+++ b/Packages.props
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/RefreshDllsForTestRun.cmd b/RefreshDllsForTestRun.cmd
index 2227f872..486df580 100644
--- a/RefreshDllsForTestRun.cmd
+++ b/RefreshDllsForTestRun.cmd
@@ -5,8 +5,8 @@ IF [%_BuildConfiguration%] NEQ [] GOTO Start
SET _BuildConfiguration=Debug
:Start
-SET _PerfTestSourceLocation="%WORKINGDIR%\test\Microsoft.SqlTools.ServiceLayer.PerfTests\bin\%_BuildConfiguration%\netcoreapp2.2\win7-x64\publish"
-SET _ServiceSourceLocation="%WORKINGDIR%\src\Microsoft.SqlTools.ServiceLayer\bin\%_BuildConfiguration%\netcoreapp2.2\win7-x64\publish"
+SET _PerfTestSourceLocation="%WORKINGDIR%\test\Microsoft.SqlTools.ServiceLayer.PerfTests\bin\%_BuildConfiguration%\netcoreapp3.1\win7-x64\publish"
+SET _ServiceSourceLocation="%WORKINGDIR%\src\Microsoft.SqlTools.ServiceLayer\bin\%_BuildConfiguration%\netcoreapp3.1\win7-x64\publish"
diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml
index d613a687..df70570e 100644
--- a/azure-pipelines/build.yml
+++ b/azure-pipelines/build.yml
@@ -91,7 +91,7 @@ steps:
enabled: false
- script: |
- copy /Y $(Build.SourcesDirectory)\bin\patch\* $(Build.SourcesDirectory)\artifacts\publish\Microsoft.SqlTools.ServiceLayer\osx.10.11-x64\netcoreapp2.2\
+ copy /Y $(Build.SourcesDirectory)\bin\patch\* $(Build.SourcesDirectory)\artifacts\publish\Microsoft.SqlTools.ServiceLayer\osx.10.11-x64\netcoreapp3.1\
displayName: 'Copy SqlClient KeepAlive patch to macOS archive'
@@ -152,46 +152,46 @@ steps:
- task: ArchiveFiles@1
displayName: 'Archive osx build'
inputs:
- rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx.10.11-x64/netcoreapp2.2'
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/osx.10.11-x64/netcoreapp3.1'
includeRootFolder: false
archiveType: tar
- archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-x64-netcoreapp2.2.tar.gz'
+ archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-osx-x64-netcoreapp3.1.tar.gz'
- task: ArchiveFiles@1
displayName: 'Archive rhel build'
inputs:
- rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/rhel.7.2-x64/netcoreapp2.2'
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/rhel.7.2-x64/netcoreapp3.1'
includeRootFolder: false
archiveType: tar
- archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-rhel-x64-netcoreapp2.2.tar.gz'
+ archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-rhel-x64-netcoreapp3.1.tar.gz'
- task: ArchiveFiles@1
displayName: 'Archive windows 64 bit build'
inputs:
- rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x64/netcoreapp2.2'
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x64/netcoreapp3.1'
includeRootFolder: false
- archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x64-netcoreapp2.2.zip'
+ archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x64-netcoreapp3.1.zip'
- task: ArchiveFiles@1
displayName: 'Archive windows 32 bit build'
inputs:
- rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x86/netcoreapp2.2'
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win7-x86/netcoreapp3.1'
includeRootFolder: false
- archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x86-netcoreapp2.2.zip'
+ archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win-x86-netcoreapp3.1.zip'
- task: ArchiveFiles@1
displayName: 'Archive windows10 arm 32 bit build'
inputs:
- rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm/netcoreapp2.2'
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm/netcoreapp3.1'
includeRootFolder: false
- archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm-netcoreapp2.2.zip'
+ archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm-netcoreapp3.1.zip'
- task: ArchiveFiles@1
displayName: 'Archive windows10 arm 64 bit build'
inputs:
- rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm64/netcoreapp2.2'
+ rootFolder: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/win10-arm64/netcoreapp3.1'
includeRootFolder: false
- archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm64-netcoreapp2.2.zip'
+ archiveFile: '$(Build.SourcesDirectory)/artifacts/package/Microsoft.SqlTools.ServiceLayer-win10-arm64-netcoreapp3.1.zip'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
diff --git a/build.cake b/build.cake
index 331e354b..edd5666a 100644
--- a/build.cake
+++ b/build.cake
@@ -279,7 +279,7 @@ Task("TestCore")
{
var logFile = System.IO.Path.Combine(logFolder, $"{testProject}-core-result.trx");
var testWorkingDir = System.IO.Path.Combine(testFolder, testProject);
- Run(dotnetcli, $"test -f netcoreapp2.2 --logger \"trx;LogFileName={logFile}\"", testWorkingDir)
+ Run(dotnetcli, $"test --logger \"trx;LogFileName={logFile}\"", testWorkingDir)
.ExceptionOnError($"Test {testProject} failed for .NET Core.");
}
});
@@ -584,7 +584,7 @@ Task("SRGen")
continue;
}
- var srgenPath = System.IO.Path.Combine(toolsFolder, "Microsoft.Data.Tools.StringResourceTool", "tools", "netcoreapp2.2", "any", "srgen.dll");
+ var srgenPath = System.IO.Path.Combine(toolsFolder, "Microsoft.Data.Tools.StringResourceTool", "lib", "netcoreapp2.2", "srgen.dll");
var outputResx = System.IO.Path.Combine(localizationDir, "sr.resx");
var inputXliff = System.IO.Path.Combine(localizationDir, "transXliff");
var outputXlf = System.IO.Path.Combine(localizationDir, "sr.xlf");
diff --git a/build.json b/build.json
index c18a6155..4dd10dd4 100644
--- a/build.json
+++ b/build.json
@@ -1,19 +1,19 @@
{
"UseSystemDotNetPath": "true",
"DotNetFolder": ".dotnet",
- "DotNetInstallScriptURL": "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain",
+ "DotNetInstallScriptURL": "https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/",
"DotNetChannel": "preview",
- "DotNetVersion": "2.1.300-preview3-008627",
+ "DotNetVersion": "3.1.202",
"BuildToolsFolder": ".tools",
"ArtifactsFolder": "artifacts",
"PackageName": "Microsoft.SqlTools.ServiceLayer",
"TestProjects": {
"Microsoft.SqlTools.ServiceLayer.UnitTests": [
- "netcoreapp2.2"
+ "netcoreapp3.1"
]
},
"Frameworks": [
- "netcoreapp2.2"
+ "netcoreapp3.1"
],
"MainProjects": [
"Microsoft.SqlTools.Credentials",
diff --git a/docs/samples/jsonrpc/netcore/executequery/jsonrpc.csproj b/docs/samples/jsonrpc/netcore/executequery/jsonrpc.csproj
index 76744472..f732588a 100644
--- a/docs/samples/jsonrpc/netcore/executequery/jsonrpc.csproj
+++ b/docs/samples/jsonrpc/netcore/executequery/jsonrpc.csproj
@@ -1,14 +1,10 @@
- netcoreapp2.2
+ netcoreapp3.1
Exe
-
-
-
-
-
+
diff --git a/global.json b/global.json
index 3010f881..6706cbd1 100644
--- a/global.json
+++ b/global.json
@@ -1,8 +1,5 @@
{
"sdk": {
- "version": "2.2.108"
- },
- "msbuild-sdks": {
- "Microsoft.Build.Traversal": "2.0.2"
+ "version": "3.1.201"
}
}
\ No newline at end of file
diff --git a/scripts/packages.config b/scripts/packages.config
index b01d9630..2f456200 100644
--- a/scripts/packages.config
+++ b/scripts/packages.config
@@ -1,8 +1,8 @@
-
-
-
+
+
+
diff --git a/sqltoolsservice.sln b/sqltoolsservice.sln
index 0e8bbbd8..f0803e43 100644
--- a/sqltoolsservice.sln
+++ b/sqltoolsservice.sln
@@ -8,6 +8,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2BBD7364-054
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AB9CA2B8-6F70-431C-8A1D-67479D8A7BE4}"
+ ProjectSection(SolutionItems) = preProject
+ test\Directory.Build.props = test\Directory.Build.props
+ EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{32DC973E-9EEA-4694-B1C2-B031167AB945}"
ProjectSection(SolutionItems) = preProject
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 737b3ac1..980961e4 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,6 +1,27 @@
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
+ Microsoft Corporation
+ Microsoft SQL Server
+
+ 1.1.2
+
+
+
+ Microsoft
+ false
+ © Microsoft Corporation. All rights reserved.
+ https://github.com/Microsoft/sqltoolsservice/blob/master/license.txt
+ http://s.gravatar.com/avatar/6f39d8562df0a3509a8240fb281bc5bd?s=80
+ https://github.com/Microsoft/sqltoolsservice/
+ SQL XPLAT
+
+
+
+ netcoreapp3.1
+ netcoreapp3.1
+ netcoreapp3.1
+
+
\ No newline at end of file
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
deleted file mode 100644
index 6fedb2a7..00000000
--- a/src/Directory.Build.targets
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- Microsoft Corporation
- Microsoft SQL Server
-
-
- 1.1.2
-
-
-
- Microsoft
- false
- © Microsoft Corporation. All rights reserved.
- https://github.com/Microsoft/sqltoolsservice/blob/master/license.txt
- http://s.gravatar.com/avatar/6f39d8562df0a3509a8240fb281bc5bd?s=80
- https://github.com/Microsoft/sqltoolsservice/
- SQL XPLAT
-
-
diff --git a/src/Microsoft.SqlTools.CoreServices/Microsoft.SqlTools.CoreServices.csproj b/src/Microsoft.SqlTools.CoreServices/Microsoft.SqlTools.CoreServices.csproj
index 92605c7c..1a7852de 100644
--- a/src/Microsoft.SqlTools.CoreServices/Microsoft.SqlTools.CoreServices.csproj
+++ b/src/Microsoft.SqlTools.CoreServices/Microsoft.SqlTools.CoreServices.csproj
@@ -1,30 +1,32 @@
-
- Library
- netstandard2.0
- Microsoft.SqlTools.CoreServices
- Microsoft.SqlTools.CoreServices
- false
-
-
- � Microsoft Corporation. All rights reserved.
-
- A collection of core services that can be reused by a Database Management Protocol-based service using the Microsoft.SqlTools.Hosting framework.
-
- $(PackageDescription)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Library
+ netstandard2.0
+ Microsoft.SqlTools.CoreServices
+ Microsoft.SqlTools.CoreServices
+ false
+
+
+ � Microsoft Corporation. All rights reserved.
+
+ A collection of core services that can be reused by a Database Management Protocol-based service using the Microsoft.SqlTools.Hosting framework.
+
+ $(PackageDescription)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj b/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj
index 96c6d930..47ff59a9 100644
--- a/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj
+++ b/src/Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj
@@ -1,38 +1,37 @@
-
- netcoreapp2.2
- MicrosoftSqlToolsCredentials
- Exe
- false
- false
- false
- false
- false
- $(DefineConstants);NETCOREAPP1_0
- true
- true
- portable
- win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ $(CredentialsTargetFramework)
+ MicrosoftSqlToolsCredentials
+ Exe
+ false
+ false
+ false
+ false
+ false
+ false
+ $(DefineConstants);NETCOREAPP1_0
+ true
+ true
+ portable
+ win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.SqlTools.DataProtocol.Contracts/Microsoft.SqlTools.DataProtocol.Contracts.csproj b/src/Microsoft.SqlTools.DataProtocol.Contracts/Microsoft.SqlTools.DataProtocol.Contracts.csproj
index 6b96c164..0320b408 100644
--- a/src/Microsoft.SqlTools.DataProtocol.Contracts/Microsoft.SqlTools.DataProtocol.Contracts.csproj
+++ b/src/Microsoft.SqlTools.DataProtocol.Contracts/Microsoft.SqlTools.DataProtocol.Contracts.csproj
@@ -10,6 +10,6 @@
-
+
\ No newline at end of file
diff --git a/src/Microsoft.SqlTools.Hosting.v2/Microsoft.SqlTools.Hosting.v2.csproj b/src/Microsoft.SqlTools.Hosting.v2/Microsoft.SqlTools.Hosting.v2.csproj
index 9b266db2..9f8d848f 100644
--- a/src/Microsoft.SqlTools.Hosting.v2/Microsoft.SqlTools.Hosting.v2.csproj
+++ b/src/Microsoft.SqlTools.Hosting.v2/Microsoft.SqlTools.Hosting.v2.csproj
@@ -15,10 +15,10 @@
$(PackageDescription)
-
-
-
-
+
+
+
+
diff --git a/src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj b/src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj
index 51d407d4..991e3b87 100644
--- a/src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj
+++ b/src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj
@@ -1,30 +1,27 @@
-
- netstandard2.0
- false
- false
- false
- false
- false
- $(DefineConstants);NETCOREAPP1_0;TRACE
- true
+
+ netstandard2.0
+ false
+ false
+ false
+ false
+ false
+ $(DefineConstants);NETCOREAPP1_0;TRACE
+ true
true
portable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj b/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj
index 52b46318..efae2691 100644
--- a/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj
+++ b/src/Microsoft.SqlTools.ManagedBatchParser/Microsoft.SqlTools.ManagedBatchParser.csproj
@@ -1,18 +1,23 @@
-
- netstandard2.0
- false
- false
- portable
-
-
-
-
-
-
-
-
-
-
-
+
+ netstandard2.0
+ false
+ false
+ portable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.SqlTools.ResourceProvider.Core/Microsoft.SqlTools.ResourceProvider.Core.csproj b/src/Microsoft.SqlTools.ResourceProvider.Core/Microsoft.SqlTools.ResourceProvider.Core.csproj
index 1f74addd..60da19e7 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.Core/Microsoft.SqlTools.ResourceProvider.Core.csproj
+++ b/src/Microsoft.SqlTools.ResourceProvider.Core/Microsoft.SqlTools.ResourceProvider.Core.csproj
@@ -1,25 +1,26 @@
-
- netstandard2.0
- Microsoft.SqlTools.ResourceProvider.Core
- Microsoft.SqlTools.ResourceProvider.Core
- false
-
- Library
-
- Provides Resource Provider and control plane services for SqlTools applications.
- � Microsoft Corporation. All rights reserved.
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ netstandard2.0
+ Microsoft.SqlTools.ResourceProvider.Core
+ Microsoft.SqlTools.ResourceProvider.Core
+ false
+
+ Library
+
+ Provides Resource Provider and control plane services for SqlTools applications.
+ � Microsoft Corporation. All rights reserved.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj
index ed39cf24..91cb5c54 100644
--- a/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj
+++ b/src/Microsoft.SqlTools.ResourceProvider.DefaultImpl/Microsoft.SqlTools.ResourceProvider.DefaultImpl.csproj
@@ -11,13 +11,13 @@
� Microsoft Corporation. All rights reserved.
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj b/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj
index 6b9fbd25..3389ae41 100644
--- a/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj
+++ b/src/Microsoft.SqlTools.ResourceProvider/Microsoft.SqlTools.ResourceProvider.csproj
@@ -1,6 +1,6 @@
- netcoreapp2.2
+ $(ResourceProivderTargetFramework)
SqlToolsResourceProviderService
SqlToolsResourceProviderService
Exe
@@ -19,8 +19,7 @@
-
-
+
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Formatter/TSqlFormatterService.cs b/src/Microsoft.SqlTools.ServiceLayer/Formatter/TSqlFormatterService.cs
index 7f781aed..540f31c9 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Formatter/TSqlFormatterService.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Formatter/TSqlFormatterService.cs
@@ -20,6 +20,7 @@ using Microsoft.SqlTools.ServiceLayer.SqlContext;
using Microsoft.SqlTools.ServiceLayer.Workspace;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Microsoft.SqlTools.Utility;
+using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.Formatter
{
diff --git a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs
index aed56060..f40561bb 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/AutoCompleteHelper.cs
@@ -1,35 +1,36 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using Microsoft.SqlServer.Management.SqlParser.Binder;
-using Microsoft.SqlServer.Management.SqlParser.Intellisense;
-using Microsoft.SqlServer.Management.SqlParser.Parser;
-using Microsoft.SqlTools.ServiceLayer.Connection;
-using Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion;
-using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
-using Microsoft.SqlTools.ServiceLayer.SqlContext;
-using Microsoft.SqlTools.Utility;
-using Microsoft.SqlTools.ServiceLayer.Workspace;
-using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
-
-namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
-{
- ///
- /// Main class for Language Service functionality including anything that reqires knowledge of
- /// the language to perfom, such as definitions, intellisense, etc.
- ///
- public static class AutoCompleteHelper
- {
- private static CompletionItem[] emptyCompletionList = new CompletionItem[0];
-
- public static readonly string[] DefaultCompletionText = new string[]
- {
+//
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+//
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using Microsoft.SqlServer.Management.SqlParser.Binder;
+using Microsoft.SqlServer.Management.SqlParser.Intellisense;
+using Microsoft.SqlServer.Management.SqlParser.Parser;
+using Microsoft.SqlTools.ServiceLayer.Connection;
+using Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion;
+using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
+using Microsoft.SqlTools.ServiceLayer.SqlContext;
+using Microsoft.SqlTools.Utility;
+using Microsoft.SqlTools.ServiceLayer.Workspace;
+using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
+using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
+
+namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
+{
+ ///
+ /// Main class for Language Service functionality including anything that reqires knowledge of
+ /// the language to perfom, such as definitions, intellisense, etc.
+ ///
+ public static class AutoCompleteHelper
+ {
+ private static CompletionItem[] emptyCompletionList = new CompletionItem[0];
+
+ public static readonly string[] DefaultCompletionText = new string[]
+ {
"abs",
"acos",
"action",
@@ -469,263 +470,263 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
"xml",
"year",
"zone",
- };
-
- ///
- /// Gets a static instance of an empty completion list to avoid
- /// unneeded memory allocations
- ///
- internal static CompletionItem[] EmptyCompletionList
- {
- get
- {
- return AutoCompleteHelper.emptyCompletionList;
- }
- }
-
- ///
- /// Checks whether a given word is in the reserved
- /// word list or not
- ///
- internal static bool IsReservedWord(string text)
- {
- return DefaultCompletionText.Contains(text, StringComparer.InvariantCultureIgnoreCase);
- }
-
- ///
- /// Get the default completion list from hard-coded list
- ///
- ///
- ///
- ///
- ///
- internal static CompletionItem[] GetDefaultCompletionItems(
- ScriptDocumentInfo scriptDocumentInfo,
- bool useLowerCase)
- {
- int row = scriptDocumentInfo.StartLine;
- int startColumn = scriptDocumentInfo.StartColumn;
- int endColumn = scriptDocumentInfo.EndColumn;
- string tokenText = scriptDocumentInfo.TokenText;
- // determine how many default completion items there will be
- int listSize = DefaultCompletionText.Length;
- if (!string.IsNullOrWhiteSpace(tokenText))
- {
- listSize = 0;
- foreach (var completionText in DefaultCompletionText)
- {
- if (completionText.StartsWith(tokenText, StringComparison.OrdinalIgnoreCase))
- {
- ++listSize;
- }
- }
- }
-
- // special case empty list to avoid unneed array allocations
- if (listSize == 0)
- {
- return emptyCompletionList;
- }
-
- // build the default completion list
- var completionItems = new CompletionItem[listSize];
- int completionItemIndex = 0;
- foreach (var completionText in DefaultCompletionText)
- {
- // add item to list if the tokenText is null (meaning return whole list)
- // or if the completion item begins with the tokenText
- if (string.IsNullOrWhiteSpace(tokenText) || completionText.StartsWith(tokenText, StringComparison.OrdinalIgnoreCase))
- {
- completionItems[completionItemIndex] = CreateDefaultCompletionItem(
- useLowerCase ? completionText.ToLowerInvariant() : completionText.ToUpperInvariant(),
- row,
- startColumn,
- endColumn);
- ++completionItemIndex;
- }
- }
-
- return completionItems;
- }
-
- ///
- /// Create a completion item from the default item text
- ///
- ///
- ///
- ///
- ///
- private static CompletionItem CreateDefaultCompletionItem(
- string label,
- int row,
- int startColumn,
- int endColumn)
- {
- return SqlCompletionItem.CreateCompletionItem(label, label + " keyword", label, CompletionItemKind.Keyword, row, startColumn, endColumn);
- }
-
- internal static CompletionItem[] AddTokenToItems(CompletionItem[] currentList, Token token, int row,
- int startColumn,
- int endColumn)
- {
- if (currentList != null &&
- token != null && !string.IsNullOrWhiteSpace(token.Text) &&
- token.Text.All(ch => char.IsLetter(ch)) &&
- currentList.All(x => string.Compare(x.Label, token.Text, true) != 0
- ))
- {
- var list = currentList.ToList();
- list.Insert(0, SqlCompletionItem.CreateCompletionItem(token.Text, token.Text, token.Text, CompletionItemKind.Text, row, startColumn, endColumn));
- return list.ToArray();
- }
- return currentList;
- }
-
- ///
- /// Converts a list of Declaration objects to CompletionItem objects
- /// since VS Code expects CompletionItems but SQL Parser works with Declarations
- ///
- ///
- ///
- ///
- ///
- internal static CompletionItem[] ConvertDeclarationsToCompletionItems(
- IEnumerable suggestions,
- int row,
- int startColumn,
- int endColumn,
- string tokenText = null)
- {
- List completions = new List();
-
- foreach (var autoCompleteItem in suggestions)
- {
- SqlCompletionItem sqlCompletionItem = new SqlCompletionItem(autoCompleteItem, tokenText);
-
- // convert the completion item candidates into CompletionItems
- completions.Add(sqlCompletionItem.CreateCompletionItem(row, startColumn, endColumn));
- }
-
- return completions.ToArray();
- }
-
- ///
- /// Converts a SQL Parser QuickInfo object into a VS Code Hover object
- ///
- ///
- ///
- ///
- ///
- internal static Hover ConvertQuickInfoToHover(
- Babel.CodeObjectQuickInfo quickInfo,
- int row,
- int startColumn,
- int endColumn)
- {
- // convert from the parser format to the VS Code wire format
- var markedStrings = new MarkedString[1];
- if (quickInfo != null)
- {
- markedStrings[0] = new MarkedString()
- {
- Language = "SQL",
- Value = quickInfo.Text
- };
-
- return new Hover()
- {
- Contents = markedStrings,
- Range = new Range
- {
- Start = new Position
- {
- Line = row,
- Character = startColumn
- },
- End = new Position
- {
- Line = row,
- Character = endColumn
- }
- }
- };
- }
- else
- {
- return null;
- }
- }
-
- ///
- /// Converts a SQL Parser List of MethodHelpText objects into a VS Code SignatureHelp object
- ///
- internal static SignatureHelp ConvertMethodHelpTextListToSignatureHelp(List methods, Babel.MethodNameAndParamLocations locations, int line, int column)
- {
- Validate.IsNotNull(nameof(methods), methods);
- Validate.IsNotNull(nameof(locations), locations);
- Validate.IsGreaterThan(nameof(line), line, 0);
- Validate.IsGreaterThan(nameof(column), column, 0);
-
- SignatureHelp help = new SignatureHelp();
-
- help.Signatures = methods.Select(method =>
- {
- return new SignatureInformation()
- {
- // Signature label format: param1, param2, ..., paramn RETURNS
- Label = method.Name + " " + method.Parameters.Select(parameter => parameter.Display).Aggregate((l, r) => l + "," + r) + " " + method.Type,
- Documentation = method.Description,
- Parameters = method.Parameters.Select(parameter =>
- {
- return new ParameterInformation()
- {
- Label = parameter.Display,
- Documentation = parameter.Description
- };
- }).ToArray()
- };
- }).Where(method => method.Label.Contains(locations.Name)).ToArray();
-
- if (help.Signatures.Length == 0)
- {
- return null;
- }
-
- // Find the matching method signature at the cursor's location
- // For now, take the first match (since we've already filtered by name above)
- help.ActiveSignature = 0;
-
- // Determine the current parameter at the cursor
- int currentParameter = -1; // Default case: not on any particular parameter
- if (locations.ParamStartLocation != null)
- {
- // Is the cursor past the function name?
- var location = locations.ParamStartLocation.Value;
- if (line > location.LineNumber || (line == location.LineNumber && line == location.LineNumber && column >= location.ColumnNumber))
- {
- currentParameter = 0;
- }
- }
- foreach (var location in locations.ParamSeperatorLocations)
- {
- // Is the cursor past a comma ',' and at least on the next parameter?
- if (line > location.LineNumber || (line == location.LineNumber && column > location.ColumnNumber))
- {
- currentParameter++;
- }
- }
- if (locations.ParamEndLocation != null)
- {
- // Is the cursor past the end of the parameter list on a different token?
- var location = locations.ParamEndLocation.Value;
- if (line > location.LineNumber || (line == location.LineNumber && line == location.LineNumber && column > location.ColumnNumber))
- {
- currentParameter = -1;
- }
- }
- help.ActiveParameter = currentParameter;
-
- return help;
- }
- }
-}
+ };
+
+ ///
+ /// Gets a static instance of an empty completion list to avoid
+ /// unneeded memory allocations
+ ///
+ internal static CompletionItem[] EmptyCompletionList
+ {
+ get
+ {
+ return AutoCompleteHelper.emptyCompletionList;
+ }
+ }
+
+ ///
+ /// Checks whether a given word is in the reserved
+ /// word list or not
+ ///
+ internal static bool IsReservedWord(string text)
+ {
+ return DefaultCompletionText.Contains(text, StringComparer.InvariantCultureIgnoreCase);
+ }
+
+ ///
+ /// Get the default completion list from hard-coded list
+ ///
+ ///
+ ///
+ ///
+ ///
+ internal static CompletionItem[] GetDefaultCompletionItems(
+ ScriptDocumentInfo scriptDocumentInfo,
+ bool useLowerCase)
+ {
+ int row = scriptDocumentInfo.StartLine;
+ int startColumn = scriptDocumentInfo.StartColumn;
+ int endColumn = scriptDocumentInfo.EndColumn;
+ string tokenText = scriptDocumentInfo.TokenText;
+ // determine how many default completion items there will be
+ int listSize = DefaultCompletionText.Length;
+ if (!string.IsNullOrWhiteSpace(tokenText))
+ {
+ listSize = 0;
+ foreach (var completionText in DefaultCompletionText)
+ {
+ if (completionText.StartsWith(tokenText, StringComparison.OrdinalIgnoreCase))
+ {
+ ++listSize;
+ }
+ }
+ }
+
+ // special case empty list to avoid unneed array allocations
+ if (listSize == 0)
+ {
+ return emptyCompletionList;
+ }
+
+ // build the default completion list
+ var completionItems = new CompletionItem[listSize];
+ int completionItemIndex = 0;
+ foreach (var completionText in DefaultCompletionText)
+ {
+ // add item to list if the tokenText is null (meaning return whole list)
+ // or if the completion item begins with the tokenText
+ if (string.IsNullOrWhiteSpace(tokenText) || completionText.StartsWith(tokenText, StringComparison.OrdinalIgnoreCase))
+ {
+ completionItems[completionItemIndex] = CreateDefaultCompletionItem(
+ useLowerCase ? completionText.ToLowerInvariant() : completionText.ToUpperInvariant(),
+ row,
+ startColumn,
+ endColumn);
+ ++completionItemIndex;
+ }
+ }
+
+ return completionItems;
+ }
+
+ ///
+ /// Create a completion item from the default item text
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static CompletionItem CreateDefaultCompletionItem(
+ string label,
+ int row,
+ int startColumn,
+ int endColumn)
+ {
+ return SqlCompletionItem.CreateCompletionItem(label, label + " keyword", label, CompletionItemKind.Keyword, row, startColumn, endColumn);
+ }
+
+ internal static CompletionItem[] AddTokenToItems(CompletionItem[] currentList, Token token, int row,
+ int startColumn,
+ int endColumn)
+ {
+ if (currentList != null &&
+ token != null && !string.IsNullOrWhiteSpace(token.Text) &&
+ token.Text.All(ch => char.IsLetter(ch)) &&
+ currentList.All(x => string.Compare(x.Label, token.Text, true) != 0
+ ))
+ {
+ var list = currentList.ToList();
+ list.Insert(0, SqlCompletionItem.CreateCompletionItem(token.Text, token.Text, token.Text, CompletionItemKind.Text, row, startColumn, endColumn));
+ return list.ToArray();
+ }
+ return currentList;
+ }
+
+ ///
+ /// Converts a list of Declaration objects to CompletionItem objects
+ /// since VS Code expects CompletionItems but SQL Parser works with Declarations
+ ///
+ ///
+ ///
+ ///
+ ///
+ internal static CompletionItem[] ConvertDeclarationsToCompletionItems(
+ IEnumerable suggestions,
+ int row,
+ int startColumn,
+ int endColumn,
+ string tokenText = null)
+ {
+ List completions = new List();
+
+ foreach (var autoCompleteItem in suggestions)
+ {
+ SqlCompletionItem sqlCompletionItem = new SqlCompletionItem(autoCompleteItem, tokenText);
+
+ // convert the completion item candidates into CompletionItems
+ completions.Add(sqlCompletionItem.CreateCompletionItem(row, startColumn, endColumn));
+ }
+
+ return completions.ToArray();
+ }
+
+ ///
+ /// Converts a SQL Parser QuickInfo object into a VS Code Hover object
+ ///
+ ///
+ ///
+ ///
+ ///
+ internal static Hover ConvertQuickInfoToHover(
+ Babel.CodeObjectQuickInfo quickInfo,
+ int row,
+ int startColumn,
+ int endColumn)
+ {
+ // convert from the parser format to the VS Code wire format
+ var markedStrings = new MarkedString[1];
+ if (quickInfo != null)
+ {
+ markedStrings[0] = new MarkedString()
+ {
+ Language = "SQL",
+ Value = quickInfo.Text
+ };
+
+ return new Hover()
+ {
+ Contents = markedStrings,
+ Range = new Range
+ {
+ Start = new Position
+ {
+ Line = row,
+ Character = startColumn
+ },
+ End = new Position
+ {
+ Line = row,
+ Character = endColumn
+ }
+ }
+ };
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ ///
+ /// Converts a SQL Parser List of MethodHelpText objects into a VS Code SignatureHelp object
+ ///
+ internal static SignatureHelp ConvertMethodHelpTextListToSignatureHelp(List methods, Babel.MethodNameAndParamLocations locations, int line, int column)
+ {
+ Validate.IsNotNull(nameof(methods), methods);
+ Validate.IsNotNull(nameof(locations), locations);
+ Validate.IsGreaterThan(nameof(line), line, 0);
+ Validate.IsGreaterThan(nameof(column), column, 0);
+
+ SignatureHelp help = new SignatureHelp();
+
+ help.Signatures = methods.Select(method =>
+ {
+ return new SignatureInformation()
+ {
+ // Signature label format: param1, param2, ..., paramn RETURNS
+ Label = method.Name + " " + method.Parameters.Select(parameter => parameter.Display).Aggregate((l, r) => l + "," + r) + " " + method.Type,
+ Documentation = method.Description,
+ Parameters = method.Parameters.Select(parameter =>
+ {
+ return new ParameterInformation()
+ {
+ Label = parameter.Display,
+ Documentation = parameter.Description
+ };
+ }).ToArray()
+ };
+ }).Where(method => method.Label.Contains(locations.Name)).ToArray();
+
+ if (help.Signatures.Length == 0)
+ {
+ return null;
+ }
+
+ // Find the matching method signature at the cursor's location
+ // For now, take the first match (since we've already filtered by name above)
+ help.ActiveSignature = 0;
+
+ // Determine the current parameter at the cursor
+ int currentParameter = -1; // Default case: not on any particular parameter
+ if (locations.ParamStartLocation != null)
+ {
+ // Is the cursor past the function name?
+ var location = locations.ParamStartLocation.Value;
+ if (line > location.LineNumber || (line == location.LineNumber && line == location.LineNumber && column >= location.ColumnNumber))
+ {
+ currentParameter = 0;
+ }
+ }
+ foreach (var location in locations.ParamSeperatorLocations)
+ {
+ // Is the cursor past a comma ',' and at least on the next parameter?
+ if (line > location.LineNumber || (line == location.LineNumber && column > location.ColumnNumber))
+ {
+ currentParameter++;
+ }
+ }
+ if (locations.ParamEndLocation != null)
+ {
+ // Is the cursor past the end of the parameter list on a different token?
+ var location = locations.ParamEndLocation.Value;
+ if (line > location.LineNumber || (line == location.LineNumber && line == location.LineNumber && column > location.ColumnNumber))
+ {
+ currentParameter = -1;
+ }
+ }
+ help.ActiveParameter = currentParameter;
+
+ return help;
+ }
+ }
+}
diff --git a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/DiagnosticsHelper.cs b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/DiagnosticsHelper.cs
index a3ab9276..164b988a 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/DiagnosticsHelper.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/LanguageServices/DiagnosticsHelper.cs
@@ -11,6 +11,7 @@ using Microsoft.SqlTools.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Microsoft.SqlTools.Utility;
+using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj b/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj
index bbd42597..c210ab4b 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj
+++ b/src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj
@@ -1,45 +1,49 @@
-
- netcoreapp2.2
- MicrosoftSqlToolsServiceLayer
- Exe
- false
- false
- false
- false
- false
- $(DefineConstants);NETCOREAPP1_0;TRACE
- true
- true
- portable
- win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64
-
+
+ $(ServiceLayerTargetFramework)
+ MicrosoftSqlToolsServiceLayer
+ Exe
+ false
+ false
+ false
+ false
+ false
+ false
+ $(DefineConstants);NETCOREAPP1_0;TRACE
+ true
+ true
+ portable
+ win7-x64;win7-x86;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.11-x64;linux-x64;win10-arm;win10-arm64
+
-
- true
-
+
+ true
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Always
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+
+
+
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoKeyCustomNode.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoKeyCustomNode.cs
index 88806197..7ac76add 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoKeyCustomNode.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoKeyCustomNode.cs
@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
+using Index = Microsoft.SqlServer.Management.Smo.Index;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs
index b6e43992..a0ddb7ea 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.cs
@@ -8,6 +8,7 @@ using System.Composition;
using System.Linq;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.Broker;
+using Index = Microsoft.SqlServer.Management.Smo.Index;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
diff --git a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt
index 5c4d5653..c9ecd553 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt
+++ b/src/Microsoft.SqlTools.ServiceLayer/ObjectExplorer/SmoModel/SmoQueryModel.tt
@@ -17,6 +17,7 @@ using System.Composition;
using System.Linq;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.Broker;
+using Index = Microsoft.SqlServer.Management.Smo.Index;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
{
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs b/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs
index b29320e7..a16f6020 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Scripting/ScripterCore.cs
@@ -26,6 +26,7 @@ using Microsoft.SqlServer.Management.Sdk.Sfc;
using System.Text;
using System.Data;
using System.Diagnostics;
+using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.Scripting
{
diff --git a/src/Microsoft.SqlTools.ServiceLayer/Workspace/WorkspaceService.cs b/src/Microsoft.SqlTools.ServiceLayer/Workspace/WorkspaceService.cs
index 60166de3..792e6226 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/Workspace/WorkspaceService.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/Workspace/WorkspaceService.cs
@@ -13,6 +13,7 @@ using Microsoft.SqlTools.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.Hosting;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Microsoft.SqlTools.Utility;
+using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.Workspace
{
diff --git a/test/Directory.Build.props b/test/Directory.Build.props
index 737b3ac1..f4716f9e 100644
--- a/test/Directory.Build.props
+++ b/test/Directory.Build.props
@@ -1,6 +1,7 @@
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
-
+
+
+
+ netcoreapp3.1
+
\ No newline at end of file
diff --git a/test/Microsoft.SqlTools.Hosting.UnitTests/Microsoft.SqlTools.Hosting.UnitTests.csproj b/test/Microsoft.SqlTools.Hosting.UnitTests/Microsoft.SqlTools.Hosting.UnitTests.csproj
index 6f3a175e..43412e5a 100644
--- a/test/Microsoft.SqlTools.Hosting.UnitTests/Microsoft.SqlTools.Hosting.UnitTests.csproj
+++ b/test/Microsoft.SqlTools.Hosting.UnitTests/Microsoft.SqlTools.Hosting.UnitTests.csproj
@@ -1,14 +1,14 @@
- netcoreapp2.2
+ $(TestProjectsTargetFramework)
false
true
-
-
-
-
+
+
+
+
diff --git a/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/App.config b/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/App.config
deleted file mode 100644
index 92035273..00000000
--- a/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/App.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.csproj b/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.csproj
index 39a7fd64..155f55da 100644
--- a/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.csproj
+++ b/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests.csproj
@@ -1,6 +1,6 @@
- netcoreapp2.2
+ $(TestProjectsTargetFramework)
false
portable
Microsoft.SqlTools.ManagedBatchParser.IntegrationTests
@@ -9,18 +9,6 @@
$(DefineConstants);TRACE
-
-
-
-
- ../../bin/ref/Newtonsoft.Json.dll
-
-
- ../../bin/ref/Moq.dll
-
-
- ../../bin/ref/Castle.Core.dll
-
@@ -28,10 +16,11 @@
-
-
-
-
+
+
+
+
+
diff --git a/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/packages.config b/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/packages.config
deleted file mode 100644
index d01e8969..00000000
--- a/test/Microsoft.SqlTools.ManagedBatchParser.IntegrationTests/packages.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/App.config b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/App.config
deleted file mode 100644
index 570b96df..00000000
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/App.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Metadata/MetadataServiceTests.cs b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Metadata/MetadataServiceTests.cs
index 37b57239..89da35f3 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Metadata/MetadataServiceTests.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Metadata/MetadataServiceTests.cs
@@ -203,10 +203,10 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.Metadata
}
};
- await VerifyMetadataList(query, expectedMetadataList);
+ await VerifyMetadataListCore(query, expectedMetadataList);
}
- private async Task VerifyMetadataList(string query, List expectedMetadataList)
+ private async Task VerifyMetadataListCore(string query, List expectedMetadataList)
{
var testDb = await SqlTestDb.CreateNewAsync(TestServerType.OnPrem, false, null, query, "MetadataTests");
try
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj
index 03c8aae8..a3435d4c 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj
+++ b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj
@@ -1,6 +1,6 @@
- netcoreapp2.2
+ $(TestProjectsTargetFramework)
false
portable
Microsoft.SqlTools.ServiceLayer.IntegrationTests
@@ -9,18 +9,6 @@
$(DefineConstants);TRACE
-
-
-
-
- ../../bin/ref/Newtonsoft.Json.dll
-
-
- ../../bin/ref/Moq.dll
-
-
- ../../bin/ref/Castle.Core.dll
-
@@ -29,10 +17,11 @@
-
-
-
-
+
+
+
+
+
diff --git a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/packages.config b/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/packages.config
deleted file mode 100644
index d01e8969..00000000
--- a/test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/packages.config
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Microsoft.SqlTools.ServiceLayer.PerfTests.csproj b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Microsoft.SqlTools.ServiceLayer.PerfTests.csproj
index 83b497bd..e6e880a1 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Microsoft.SqlTools.ServiceLayer.PerfTests.csproj
+++ b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Microsoft.SqlTools.ServiceLayer.PerfTests.csproj
@@ -1,40 +1,33 @@
-
-
- netcoreapp2.2
- false
- portable
- Microsoft.SqlTools.ServiceLayer.PerfTests
- Exe
- true
- false
- false
- win7-x64;win7-x86
- Microsoft.SqlTools.ServiceLayer.PerfTests.Program
- true
- true
-
-
-
- ../../bin/ref/Newtonsoft.Json.dll
-
-
- ../../bin/ref/Moq.dll
-
-
- ../../bin/ref/Castle.Core.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ $(TestProjectsTargetFramework)
+ false
+ portable
+ Microsoft.SqlTools.ServiceLayer.PerfTests
+ Exe
+ true
+ false
+ false
+ win7-x64;win7-x86
+ Microsoft.SqlTools.ServiceLayer.PerfTests.Program
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/IntellisenseTests.cs b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/IntellisenseTests.cs
index 9765aae4..5b30c4cf 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/IntellisenseTests.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/IntellisenseTests.cs
@@ -12,6 +12,7 @@ using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Xunit;
+using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.PerfTests
{
diff --git a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/QueryExecutionTests.cs b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/QueryExecutionTests.cs
index e035f596..72d84dc8 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/QueryExecutionTests.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.PerfTests/Tests/QueryExecutionTests.cs
@@ -18,49 +18,49 @@ namespace Microsoft.SqlTools.ServiceLayer.PerfTests
[Fact]
public async Task QueryResultSummaryOnPremTest()
{
- await QueryResultSummaryOnPremTest(TestServerType.OnPrem, Scripts.MasterBasicQuery);
+ await QueryResultSummaryOnPremTestCore(TestServerType.OnPrem, Scripts.MasterBasicQuery);
}
[Fact]
public async Task QueryResultFirstOnPremTest()
{
- await QueryResultFirstOnPremTest(TestServerType.OnPrem, Scripts.MasterBasicQuery);
+ await QueryResultFirstOnPremTestCore(TestServerType.OnPrem, Scripts.MasterBasicQuery);
}
[Fact]
public async Task LongQueryResultSummaryOnPremTest()
{
- await QueryResultSummaryOnPremTest(TestServerType.OnPrem, Scripts.MasterLongQuery);
+ await QueryResultSummaryOnPremTestCore(TestServerType.OnPrem, Scripts.MasterLongQuery);
}
[Fact]
public async Task LongQueryResultFirstOnPremTest()
{
- await QueryResultFirstOnPremTest(TestServerType.OnPrem, Scripts.MasterLongQuery);
+ await QueryResultFirstOnPremTestCore(TestServerType.OnPrem, Scripts.MasterLongQuery);
}
[Fact]
public async Task QueryResultSummaryOnAzureTest()
{
- await QueryResultSummaryOnPremTest(TestServerType.Azure, Scripts.MasterBasicQuery);
+ await QueryResultSummaryOnPremTestCore(TestServerType.Azure, Scripts.MasterBasicQuery);
}
[Fact]
public async Task QueryResultFirstOnAzureTest()
{
- await QueryResultFirstOnPremTest(TestServerType.Azure, Scripts.MasterBasicQuery);
+ await QueryResultFirstOnPremTestCore(TestServerType.Azure, Scripts.MasterBasicQuery);
}
[Fact]
public async Task LongQueryResultSummaryOnAzureTest()
{
- await QueryResultSummaryOnPremTest(TestServerType.Azure, Scripts.MasterLongQuery);
+ await QueryResultSummaryOnPremTestCore(TestServerType.Azure, Scripts.MasterLongQuery);
}
[Fact]
public async Task LongQueryResultFirstOnAzureTest()
{
- await QueryResultFirstOnPremTest(TestServerType.Azure, Scripts.MasterLongQuery);
+ await QueryResultFirstOnPremTestCore(TestServerType.Azure, Scripts.MasterLongQuery);
}
[Fact]
@@ -103,7 +103,7 @@ namespace Microsoft.SqlTools.ServiceLayer.PerfTests
}
- private async Task QueryResultSummaryOnPremTest(TestServerType serverType, string query, [CallerMemberName] string testName = "")
+ private async Task QueryResultSummaryOnPremTestCore(TestServerType serverType, string query, [CallerMemberName] string testName = "")
{
await TestServiceDriverProvider.RunTestIterations(async (timer) =>
{
@@ -124,7 +124,7 @@ namespace Microsoft.SqlTools.ServiceLayer.PerfTests
}, testName);
}
- private async Task QueryResultFirstOnPremTest(TestServerType serverType, string query, [CallerMemberName] string testName = "")
+ private async Task QueryResultFirstOnPremTestCore(TestServerType serverType, string query, [CallerMemberName] string testName = "")
{
await TestServiceDriverProvider.RunTestIterations(async (timer) =>
{
diff --git a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj
index 718fe19b..c8399d1f 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj
+++ b/test/Microsoft.SqlTools.ServiceLayer.Test.Common/Microsoft.SqlTools.ServiceLayer.Test.Common.csproj
@@ -1,6 +1,6 @@
- netcoreapp2.2
+ $(TestProjectsTargetFramework)
false
false
false
@@ -8,9 +8,10 @@
false
-
-
-
+
+
+
+
@@ -20,12 +21,6 @@
-
- ..\..\bin\ref\Moq.dll
-
-
- ..\..\bin\ref\Newtonsoft.Json.dll
-
diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests.csproj b/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests.csproj
index cba07614..047c1f5c 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests.csproj
+++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests.csproj
@@ -1,6 +1,6 @@
- netcoreapp2.2
+ $(TestProjectsTargetFramework)
portable
Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
Exe
@@ -20,9 +20,9 @@
-
-
-
+
+
+
diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/StressTests.cs b/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/StressTests.cs
index d5aa7915..ee9a19a0 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/StressTests.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver.Tests/StressTests.cs
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
using Microsoft.SqlTools.ServiceLayer.Test.Common;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Xunit;
+using Range = Microsoft.SqlTools.ServiceLayer.Workspace.Contracts.Range;
namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Tests
{
diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs
index 0132b757..b715f668 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Driver/ServiceTestDriver.cs
@@ -51,7 +51,7 @@ namespace Microsoft.SqlTools.ServiceLayer.TestDriver.Driver
{
// Include a fallback value to for running tests within visual studio
serviceHostExecutable =
- @"..\..\..\..\..\src\Microsoft.SqlTools.ServiceLayer\bin\Debug\netcoreapp2.2\win7-x64\MicrosoftSqlToolsServiceLayer.exe";
+ @"..\..\..\..\..\src\Microsoft.SqlTools.ServiceLayer\bin\Debug\netcoreapp3.1\win7-x64\MicrosoftSqlToolsServiceLayer.exe";
}
serviceHostExecutable = Path.GetFullPath(serviceHostExecutable);
diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Microsoft.SqlTools.ServiceLayer.TestDriver.csproj b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Microsoft.SqlTools.ServiceLayer.TestDriver.csproj
index bc89b3a4..4be29f85 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Microsoft.SqlTools.ServiceLayer.TestDriver.csproj
+++ b/test/Microsoft.SqlTools.ServiceLayer.TestDriver/Microsoft.SqlTools.ServiceLayer.TestDriver.csproj
@@ -1,6 +1,6 @@
- netcoreapp2.2
+ $(TestProjectsTargetFramework)
false
false
false
@@ -8,9 +8,9 @@
false
-
-
-
+
+
+
diff --git a/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Microsoft.SqlTools.ServiceLayer.TestEnvConfig.csproj b/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Microsoft.SqlTools.ServiceLayer.TestEnvConfig.csproj
index 7a297389..4b197306 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Microsoft.SqlTools.ServiceLayer.TestEnvConfig.csproj
+++ b/test/Microsoft.SqlTools.ServiceLayer.TestEnvConfig/Microsoft.SqlTools.ServiceLayer.TestEnvConfig.csproj
@@ -1,6 +1,6 @@
- netcoreapp2.2
+ $(TestProjectsTargetFramework)
Microsoft.SqlTools.ServiceLayer.TestEnvConfig
Exe
true
diff --git a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/App.config b/test/Microsoft.SqlTools.ServiceLayer.UnitTests/App.config
deleted file mode 100644
index 570b96df..00000000
--- a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/App.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs b/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs
index 602732a5..242801ec 100644
--- a/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs
+++ b/test/Microsoft.SqlTools.ServiceLayer.UnitTests/EditData/CellUpdateTests.cs
@@ -95,7 +95,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.EditData
Assert.Equal(col, cu.Column);
}
- public static IEnumerable