mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Publishing SQL Core library in nuget (#2173)
* Set up CI with Azure Pipelines [skip ci] * Update publishSqlCoreProject.yml for Azure Pipelines * Update publishSqlCoreProject.yml for Azure Pipelines * Update publishSqlCoreProject.yml for Azure Pipelines * Update publishSqlCoreProject.yml for Azure Pipelines * Update publishSqlCoreProject.yml for Azure Pipelines * Updating json rpc target framework * Fixing packages to pack * fixing pattern * Fixing project pattern * adding versioning schema * fixing versioning scheme * fixing nuget package name * adding name * removing var * Fixing stuff * Fixing stuff * Fixing stuff * Fixing build name * removing build name * fixing name * fixing stuff * fix pattern * Fixing stuff * Fixing feed * Fix stuff * Fixing feed * fixing proj name * Fixing stuff * Fixing netframework version * Fixing target framework * Adding target framework to dependency * Fixing frameworks * adding net7.0 * adding flag * Fixing target frameworks and making code compatible with lang version * fixed flag * Fixing assembly name * Adding hosting in nuget package * Fixing tests * Moving steps to its main pipeline * only releasing when release is true * Fixing build scripts * Adding version to csproj for packaging * adding version * Fix dirs * Adding version number to right prop group * Adding necessary dis * Fixing build number * fixing datatype * Using different var * Removing unused yml * Adding back nullables to hosting * Adding back more nullables * adding back more nullables * moving some props to dir level * Fixing tests * Removing dup properties * Supporting different target frameworks in hosting * Removing additional setting in csproj * signing sql core dll in publish * Fixing version setting * Adding to build * Added signing and packaging flag * Fixing file pattern
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
||||||
<HighEntropyVA>true</HighEntropyVA>
|
<HighEntropyVA>true</HighEntropyVA>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
|
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
|
||||||
|
|
||||||
<!-- Defaults-->
|
<!-- Defaults-->
|
||||||
|
|||||||
@@ -58,6 +58,18 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
useGlobalJson: true
|
useGlobalJson: true
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: 'Add version number to SqlCore project for packaging'
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: |
|
||||||
|
$projectFile = '$(Build.SourcesDirectory)\src\Microsoft.SqlTools.SqlCore\Microsoft.SqlTools.SqlCore.csproj'
|
||||||
|
$props = New-Object XML
|
||||||
|
$props.Load($projectFile)
|
||||||
|
$version = ($(Major)).ToString() + '.' + ($(Minor)).ToString() + '.' + $(Patch) + $(Build.BuildNumber);
|
||||||
|
$props.Project.PropertyGroup.Version = $version;
|
||||||
|
$props.Save($projectFile)
|
||||||
|
|
||||||
- task: BatchScript@1
|
- task: BatchScript@1
|
||||||
displayName: 'Run script build.cmd'
|
displayName: 'Run script build.cmd'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -104,7 +116,7 @@ steps:
|
|||||||
summaryFileLocation: '$(Agent.TempDirectory)/coverlet/reports/Cobertura.xml'
|
summaryFileLocation: '$(Agent.TempDirectory)/coverlet/reports/Cobertura.xml'
|
||||||
|
|
||||||
- task: PowerShell@2
|
- task: PowerShell@2
|
||||||
displayName: 'Generate Nuspec Version'
|
displayName: 'Generate ManagedBatchParser Nuspec Version'
|
||||||
inputs:
|
inputs:
|
||||||
targetType: 'inline'
|
targetType: 'inline'
|
||||||
script: |
|
script: |
|
||||||
@@ -163,7 +175,60 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
ConnectedServiceName: 'Code Signing'
|
ConnectedServiceName: 'Code Signing'
|
||||||
FolderPath: '$(Build.SourcesDirectory)/artifacts/publish'
|
FolderPath: '$(Build.SourcesDirectory)/artifacts/publish'
|
||||||
Pattern: 'Microsoft.SqlTools.ManagedBatchParser.dll,MicrosoftSqlToolsCredentials.exe,MicrosoftSqlToolsServiceLayer.exe,SqlSerializationService.exe,SqlToolsResourceProviderService.exe,Microsoft.SqlTools.Hosting.dll,Microsoft.SqlTools.ResourceProvider.Core.dll,Microsoft.SqlTools.ResourceProvider.DefaultImpl.dll,MicrosoftSqlToolsCredentials.dll,MicrosoftSqlToolsServiceLayer.dll,Newtonsoft.Json.dll,SqlSerializationService.dll,SqlToolsResourceProviderService.dll,System.Data.SqlClient.dll,System.Net.Sockets.dll,MicrosoftSqlToolsMigration.exe,MicrosoftSqlToolsMigration.dll'
|
Pattern: 'Microsoft.SqlTools.ManagedBatchParser.dll,MicrosoftSqlToolsCredentials.exe,MicrosoftSqlToolsServiceLayer.exe,SqlSerializationService.exe,SqlToolsResourceProviderService.exe,Microsoft.SqlTools.Hosting.dll,Microsoft.SqlTools.ResourceProvider.Core.dll,Microsoft.SqlTools.ResourceProvider.DefaultImpl.dll,MicrosoftSqlToolsCredentials.dll,MicrosoftSqlToolsServiceLayer.dll,Newtonsoft.Json.dll,SqlSerializationService.dll,SqlToolsResourceProviderService.dll,System.Data.SqlClient.dll,System.Net.Sockets.dll,MicrosoftSqlToolsMigration.exe,MicrosoftSqlToolsMigration.dll,Microsoft.SqlTools.SqlCore.dll'
|
||||||
|
signConfigType: inlineSignParams
|
||||||
|
inlineOperation: |
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"keyCode": "CP-230012",
|
||||||
|
"operationSetCode": "SigntoolSign",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"parameterName": "OpusName",
|
||||||
|
"parameterValue": "SQL Tools Service"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "OpusInfo",
|
||||||
|
"parameterValue": "https://github.com/microsoft/sqltoolsservice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "PageHash",
|
||||||
|
"parameterValue": "/NPH"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "FileDigest",
|
||||||
|
"parameterValue": "/fd sha256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameterName": "TimeStamp",
|
||||||
|
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"toolName": "signtool.exe",
|
||||||
|
"toolVersion": "6.2.9304.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"keyCode": "CP-230012",
|
||||||
|
"operationSetCode": "SigntoolVerify",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"parameterName": "VerifyAll",
|
||||||
|
"parameterValue": "/all"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"toolName": "signtool.exe",
|
||||||
|
"toolVersion": "6.2.9304.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
SessionTimeout: 600
|
||||||
|
MaxConcurrency: 5
|
||||||
|
|
||||||
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
|
displayName: 'ESRP SqlCore CodeSigning - sha256 only'
|
||||||
|
inputs:
|
||||||
|
ConnectedServiceName: 'Code Signing'
|
||||||
|
FolderPath: '$(Build.SourcesDirectory)/src/Microsoft.SqlTools.SqlCore/bin/$(buildConfiguration)/netstandard2.0'
|
||||||
|
Pattern: '*.dll'
|
||||||
signConfigType: inlineSignParams
|
signConfigType: inlineSignParams
|
||||||
inlineOperation: |
|
inlineOperation: |
|
||||||
[
|
[
|
||||||
@@ -225,6 +290,13 @@ steps:
|
|||||||
filename: build.cmd
|
filename: build.cmd
|
||||||
arguments: "-target=dotnetpackservicetools -mono"
|
arguments: "-target=dotnetpackservicetools -mono"
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: 'dotnet pack sqlcore'
|
||||||
|
inputs:
|
||||||
|
command: custom
|
||||||
|
custom: pack
|
||||||
|
arguments: '--output $(Build.SourcesDirectory)\artifacts\nugetPackages --no-build --no-restore src\Microsoft.SqlTools.SqlCore\Microsoft.SqlTools.SqlCore.csproj'
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
displayName: 'ESRP Code Signing - Nuget Package'
|
displayName: 'ESRP Code Signing - Nuget Package'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -290,6 +362,15 @@ steps:
|
|||||||
publishVstsFeed: '2191dd5f-4aec-491b-ac50-568bbc331c8a'
|
publishVstsFeed: '2191dd5f-4aec-491b-ac50-568bbc331c8a'
|
||||||
allowPackageConflicts: true
|
allowPackageConflicts: true
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: 'NuGet push SqlCore'
|
||||||
|
condition: eq(variables['RELEASE_SQLCORE'], 'true')
|
||||||
|
inputs:
|
||||||
|
command: push
|
||||||
|
packagesToPush: '$(Build.SourcesDirectory)/artifacts/nugetPackages/**/Microsoft.SqlTools.SqlCore.*.nupkg'
|
||||||
|
feedPublish: 'mssqltools'
|
||||||
|
allowPackageConflicts: true
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||||
displayName: 'Component Detection'
|
displayName: 'Component Detection'
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
26
build.cake
26
build.cake
@@ -37,8 +37,7 @@ var shellExtension = IsRunningOnWindows() ? "ps1" : "sh";
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class BuildPlan
|
public class BuildPlan
|
||||||
{
|
{
|
||||||
public string[] FxBuildProjects { get; set; }
|
public Project[] FxBuildProjects { get; set; }
|
||||||
public string[] FxFrameworks { get; set; }
|
|
||||||
public IDictionary<string, string[]> TestProjects { get; set; }
|
public IDictionary<string, string[]> TestProjects { get; set; }
|
||||||
public string BuildToolsFolder { get; set; }
|
public string BuildToolsFolder { get; set; }
|
||||||
public string ArtifactsFolder { get; set; }
|
public string ArtifactsFolder { get; set; }
|
||||||
@@ -63,6 +62,8 @@ public class Project
|
|||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string[] PackageProjects { get; set; }
|
public string[] PackageProjects { get; set; }
|
||||||
public string[] TestProjects { get; set; }
|
public string[] TestProjects { get; set; }
|
||||||
|
public string[] Frameworks { get; set; }
|
||||||
|
public bool SkipPack { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
var buildPlan = JsonConvert.DeserializeObject<BuildPlan>(
|
var buildPlan = JsonConvert.DeserializeObject<BuildPlan>(
|
||||||
@@ -263,10 +264,10 @@ Task("BuildFx")
|
|||||||
{
|
{
|
||||||
foreach (var project in buildPlan.FxBuildProjects)
|
foreach (var project in buildPlan.FxBuildProjects)
|
||||||
{
|
{
|
||||||
foreach (var framework in buildPlan.FxFrameworks)
|
foreach (var framework in project.Frameworks)
|
||||||
{
|
{
|
||||||
var projectFolder = System.IO.Path.Combine(sourceFolder, project);
|
var projectFolder = System.IO.Path.Combine(sourceFolder, project.Name);
|
||||||
var logPath = System.IO.Path.Combine(logFolder, $"{project}-{framework}-build.log");
|
var logPath = System.IO.Path.Combine(logFolder, $"{project.Name}-{framework}-build.log");
|
||||||
using (var logWriter = new StreamWriter(logPath)) {
|
using (var logWriter = new StreamWriter(logPath)) {
|
||||||
Run(dotnetcli, $"build --framework {framework} --configuration {configuration} \"{projectFolder}\"",
|
Run(dotnetcli, $"build --framework {framework} --configuration {configuration} \"{projectFolder}\"",
|
||||||
new RunOptions
|
new RunOptions
|
||||||
@@ -274,7 +275,7 @@ Task("BuildFx")
|
|||||||
StandardOutputWriter = logWriter,
|
StandardOutputWriter = logWriter,
|
||||||
StandardErrorWriter = logWriter
|
StandardErrorWriter = logWriter
|
||||||
})
|
})
|
||||||
.ExceptionOnError($"Building test {project} failed for {framework}. See {logPath} for more details.");
|
.ExceptionOnError($"Building test {project.Name} failed for {framework}. See {logPath} for more details.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -308,10 +309,14 @@ Task("DotnetPackNuspec")
|
|||||||
{
|
{
|
||||||
foreach (var project in buildPlan.FxBuildProjects)
|
foreach (var project in buildPlan.FxBuildProjects)
|
||||||
{
|
{
|
||||||
|
if (project.SkipPack != null && project.SkipPack)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// For now, putting all nugets in the 1 directory
|
// For now, putting all nugets in the 1 directory
|
||||||
var outputFolder = System.IO.Path.Combine(nugetPackageFolder);
|
var outputFolder = System.IO.Path.Combine(nugetPackageFolder);
|
||||||
var projectFolder = System.IO.Path.Combine(packagesFolder, project);
|
var projectFolder = System.IO.Path.Combine(packagesFolder, project.Name);
|
||||||
DotnetPackNuspec(outputFolder, projectFolder, project);
|
DotnetPackNuspec(outputFolder, projectFolder, project.Name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -469,9 +474,10 @@ void PublishProject(string packageName, string[] projects)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buildPlan.FxBuildProjects.Contains(project))
|
if (buildPlan.FxBuildProjects.Any(p => p.Name == project))
|
||||||
{
|
{
|
||||||
foreach(var framework in buildPlan.FxFrameworks)
|
var projDefinition = buildPlan.FxBuildProjects.First(p => p.Name == project);
|
||||||
|
foreach(var framework in projDefinition.Frameworks)
|
||||||
{
|
{
|
||||||
var outputFolder = System.IO.Path.Combine(publishFolder, packageName, "default", framework);
|
var outputFolder = System.IO.Path.Combine(publishFolder, packageName, "default", framework);
|
||||||
var publishArguments = "publish";
|
var publishArguments = "publish";
|
||||||
|
|||||||
19
build.json
19
build.json
@@ -24,10 +24,6 @@
|
|||||||
"Frameworks": [
|
"Frameworks": [
|
||||||
"net7.0"
|
"net7.0"
|
||||||
],
|
],
|
||||||
"FxFrameworks":[
|
|
||||||
"net472",
|
|
||||||
"net7.0"
|
|
||||||
],
|
|
||||||
"MainProjects": [
|
"MainProjects": [
|
||||||
"Microsoft.SqlTools.Credentials",
|
"Microsoft.SqlTools.Credentials",
|
||||||
"Microsoft.SqlTools.ResourceProvider",
|
"Microsoft.SqlTools.ResourceProvider",
|
||||||
@@ -37,7 +33,20 @@
|
|||||||
"Microsoft.SqlTools.Migration"
|
"Microsoft.SqlTools.Migration"
|
||||||
],
|
],
|
||||||
"FxBuildProjects": [
|
"FxBuildProjects": [
|
||||||
"Microsoft.SqlTools.ManagedBatchParser"
|
{
|
||||||
|
"Name": "Microsoft.SqlTools.ManagedBatchParser",
|
||||||
|
"Frameworks": [
|
||||||
|
"net472",
|
||||||
|
"net7.0"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "Microsoft.SqlTools.SqlCore",
|
||||||
|
"Frameworks": [
|
||||||
|
"netstandard2.0"
|
||||||
|
],
|
||||||
|
"SkipPack": "true"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"PackageProjects": [
|
"PackageProjects": [
|
||||||
"Microsoft.SqlTools.Hosting"
|
"Microsoft.SqlTools.Hosting"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<RuntimeIdentifiers>$(ToolsServiceTargetRuntimes)</RuntimeIdentifiers>
|
<RuntimeIdentifiers>$(ToolsServiceTargetRuntimes)</RuntimeIdentifiers>
|
||||||
<!-- False alerts, disabled due to issue: https://github.com/dotnet/roslyn/issues/65850 -->
|
<!-- False alerts, disabled due to issue: https://github.com/dotnet/roslyn/issues/65850 -->
|
||||||
<NoWarn>$(NoWarn);CS8795</NoWarn>
|
<NoWarn>$(NoWarn);CS8795</NoWarn>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
This is a Diagnostic Alert .NET 7 onwards.Changing to LibraryImportAttribute would require additional code changes,
|
This is a Diagnostic Alert .NET 7 onwards.Changing to LibraryImportAttribute would require additional code changes,
|
||||||
therefore this warning is suppressed.-->
|
therefore this warning is suppressed.-->
|
||||||
<NoWarn>$(NoWarn);SYSLIB1054</NoWarn>
|
<NoWarn>$(NoWarn);SYSLIB1054</NoWarn>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ namespace Microsoft.SqlTools.Extensibility
|
|||||||
"microsofsqltoolscredentials.dll",
|
"microsofsqltoolscredentials.dll",
|
||||||
"microsoft.sqltools.hosting.dll",
|
"microsoft.sqltools.hosting.dll",
|
||||||
"microsoftsqltoolsservicelayer.dll",
|
"microsoftsqltoolsservicelayer.dll",
|
||||||
"microsoftkustoservicelayer.dll"
|
"microsoftkustoservicelayer.dll",
|
||||||
|
"microsoft.sqltools.sqlcore.dll"
|
||||||
};
|
};
|
||||||
|
|
||||||
private Func<ConventionBuilder, ContainerConfiguration> config;
|
private Func<ConventionBuilder, ContainerConfiguration> config;
|
||||||
|
|||||||
@@ -121,7 +121,11 @@ namespace Microsoft.SqlTools.Hosting.Protocol
|
|||||||
public async Task WaitForExitAsync()
|
public async Task WaitForExitAsync()
|
||||||
{
|
{
|
||||||
this.endpointExitedTask = new TaskCompletionSource<bool>();
|
this.endpointExitedTask = new TaskCompletionSource<bool>();
|
||||||
|
#if NETSTANDARD2_0
|
||||||
|
await this.endpointExitedTask.Task;
|
||||||
|
#else
|
||||||
await this.endpointExitedTask.Task.WaitAsync(CancellationToken.None);
|
await this.endpointExitedTask.Task.WaitAsync(CancellationToken.None);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Stop()
|
public async Task Stop()
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<AssemblyTitle>SqlTools Hosting Library</AssemblyTitle>
|
<AssemblyTitle>SqlTools Hosting Library</AssemblyTitle>
|
||||||
<Description>Provides hosting services for SqlTools applications.</Description>
|
<Description>Provides hosting services for SqlTools applications.</Description>
|
||||||
|
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
|
||||||
|
<LangVersion>8.0</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
||||||
|
|||||||
@@ -202,7 +202,11 @@ namespace Microsoft.SqlTools.Utility
|
|||||||
int uniqueId;
|
int uniqueId;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
#if NETSTANDARD2_0
|
||||||
|
uniqueId = Process.GetCurrentProcess().Id;
|
||||||
|
#else
|
||||||
uniqueId = Environment.ProcessId;
|
uniqueId = Environment.ProcessId;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -256,8 +260,10 @@ namespace Microsoft.SqlTools.Utility
|
|||||||
/// Writes a PII message to the log file with the Verbose event level when PII flag is enabled.
|
/// Writes a PII message to the log file with the Verbose event level when PII flag is enabled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="logMessage">The message text to be written.</param>
|
/// <param name="logMessage">The message text to be written.</param>
|
||||||
public static void Pii(string logMessage) {
|
public static void Pii(string logMessage)
|
||||||
if (IsPiiEnabled) {
|
{
|
||||||
|
if (IsPiiEnabled)
|
||||||
|
{
|
||||||
Write(TraceEventType.Verbose, logMessage);
|
Write(TraceEventType.Verbose, logMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if NETSTANDARD2_0
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
using System.Diagnostics.Tracing;
|
using System.Diagnostics.Tracing;
|
||||||
using Microsoft.SqlTools.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
@@ -41,7 +44,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility
|
|||||||
{
|
{
|
||||||
if (payload != null)
|
if (payload != null)
|
||||||
{
|
{
|
||||||
|
#if NETSTANDARD2_0_OR_GREATER
|
||||||
|
Logger.Verbose($"eventTID:{Environment.CurrentManagedThreadId} {payload.ToString()}");
|
||||||
|
#else
|
||||||
Logger.Verbose($"eventTID:{eventData.OSThreadId} {payload.ToString()}");
|
Logger.Verbose($"eventTID:{eventData.OSThreadId} {payload.ToString()}");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
|
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
|
||||||
<!-- Disable CA1852 (Seal internal types) as it depends on SrGen Tool -->
|
<!-- Disable CA1852 (Seal internal types) as it depends on SrGen Tool -->
|
||||||
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" />
|
<PackageReference Include="Microsoft.Data.SqlClient" />
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
|
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
|
||||||
<AssemblyTitle>SqlTools Migration Host Protocol Library</AssemblyTitle>
|
<AssemblyTitle>SqlTools Migration Host Protocol Library</AssemblyTitle>
|
||||||
<Description>Provides message types and client/server APIs for the SqlTools Migration Services JSON protocol.</Description>
|
<Description>Provides message types and client/server APIs for the SqlTools Migration Services JSON protocol.</Description>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<StartupObject />
|
<StartupObject />
|
||||||
<Description>Provides Resource Provider and control plane services for SqlTools applications.</Description>
|
<Description>Provides Resource Provider and control plane services for SqlTools applications.</Description>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" />
|
<PackageReference Include="Microsoft.Data.SqlClient" />
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<Copyright><EFBFBD> Microsoft Corporation. All rights reserved.</Copyright>
|
<Copyright><EFBFBD> Microsoft Corporation. All rights reserved.</Copyright>
|
||||||
<!-- Disable CA1852 (Seal internal types) as it depends on SrGen Tool -->
|
<!-- Disable CA1852 (Seal internal types) as it depends on SrGen Tool -->
|
||||||
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" />
|
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" />
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||||
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
|
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
|
||||||
<RuntimeIdentifiers>$(ToolsServiceTargetRuntimes)</RuntimeIdentifiers>
|
<RuntimeIdentifiers>$(ToolsServiceTargetRuntimes)</RuntimeIdentifiers>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<!-- Disable CA1852 (Seal internal types) as it depends on SrGen Tool -->
|
<!-- Disable CA1852 (Seal internal types) as it depends on SrGen Tool -->
|
||||||
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
<NoWarn>$(NoWarn);CA1852</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
"microsofsqltoolscredentials.dll",
|
"microsofsqltoolscredentials.dll",
|
||||||
"microsoft.sqltools.hosting.dll",
|
"microsoft.sqltools.hosting.dll",
|
||||||
"microsoftsqltoolsservicelayer.dll",
|
"microsoftsqltoolsservicelayer.dll",
|
||||||
"microsoftsqltoolssqlcore.dll"
|
"microsoft.sqltools.sqlcore.dll"
|
||||||
});
|
});
|
||||||
serviceProvider.RegisterSingleService(sqlToolsContext);
|
serviceProvider.RegisterSingleService(sqlToolsContext);
|
||||||
serviceProvider.RegisterSingleService(serviceHost);
|
serviceProvider.RegisterSingleService(serviceHost);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<Description>Provides message types and client/server APIs for the SqlTools Editor Services JSON protocol.</Description>
|
<Description>Provides message types and client/server APIs for the SqlTools Editor Services JSON protocol.</Description>
|
||||||
<!-- False alerts, disabled due to issue: https://github.com/dotnet/roslyn/issues/65850 -->
|
<!-- False alerts, disabled due to issue: https://github.com/dotnet/roslyn/issues/65850 -->
|
||||||
<NoWarn>$(NoWarn);CS8795</NoWarn>
|
<NoWarn>$(NoWarn);CS8795</NoWarn>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<AssemblyTitle>SqlTools SqlCore Library</AssemblyTitle>
|
<AssemblyTitle>SqlTools SqlCore Library</AssemblyTitle>
|
||||||
<Description>Provides core sql functionality for SQL server editors like Object explorer, Query Execution and Scripting</Description>
|
<Description>Provides core sql functionality for SQL server editors like Object explorer, Query Execution and Scripting</Description>
|
||||||
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
<LangVersion>8.0</LangVersion>
|
||||||
|
<AssemblyName>Microsoft.SqlTools.SqlCore</AssemblyName>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
||||||
@@ -21,7 +25,7 @@
|
|||||||
<PackageReference Include="System.Configuration.ConfigurationManager" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Localization\*.resx" />
|
<EmbeddedResource Include="Localization\*.resx" />
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Has information for filtering a SMO object by properties
|
/// Has information for filtering a SMO object by properties
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface INodeFilter
|
public abstract class INodeFilter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns true if the filter can be apply to the given type and Server type
|
/// Returns true if the filter can be apply to the given type and Server type
|
||||||
@@ -21,14 +21,14 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
/// <param name="type">Type of the querier</param>
|
/// <param name="type">Type of the querier</param>
|
||||||
/// <param name="validForFlag">Server Type</param>
|
/// <param name="validForFlag">Server Type</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
bool CanApplyFilter(Type type, ValidForFlag validForFlag);
|
public abstract bool CanApplyFilter(Type type, ValidForFlag validForFlag);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a string from the filter property and values to be used in the Urn to query the SQL objects
|
/// Creates a string from the filter property and values to be used in the Urn to query the SQL objects
|
||||||
/// Example of the output:[@ IsSystemObject = 0]
|
/// Example of the output:[@ IsSystemObject = 0]
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
string ToPropertyFilterString(Type type, ValidForFlag validForFlag);
|
public abstract string ToPropertyFilterString(Type type, ValidForFlag validForFlag);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a fully paramaterized property filter string for the URN query for SQL objects.
|
/// Creates a fully paramaterized property filter string for the URN query for SQL objects.
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">Type of the querier</param>
|
/// <param name="type">Type of the querier</param>
|
||||||
/// <param name="validForFlag">Server Type</param>
|
/// <param name="validForFlag">Server Type</param>
|
||||||
public bool CanApplyFilter(Type type, ValidForFlag validForFlag) {
|
public override bool CanApplyFilter(Type type, ValidForFlag validForFlag) {
|
||||||
return this.FilterList.Exists(f => f.CanApplyFilter(type, validForFlag));
|
return this.FilterList.Exists(f => f.CanApplyFilter(type, validForFlag));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
/// Example of the output: ((@TableTemporalType = 1) or (@LedgerTableType = 1))
|
/// Example of the output: ((@TableTemporalType = 1) or (@LedgerTableType = 1))
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string ToPropertyFilterString(Type type, ValidForFlag validForFlag)
|
public override string ToPropertyFilterString(Type type, ValidForFlag validForFlag)
|
||||||
{
|
{
|
||||||
StringBuilder filter = new StringBuilder();
|
StringBuilder filter = new StringBuilder();
|
||||||
foreach (var nodeFilter in FilterList)
|
foreach (var nodeFilter in FilterList)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
/// <param name="type">Type of the querier</param>
|
/// <param name="type">Type of the querier</param>
|
||||||
/// <param name="validForFlag">Server Type</param>
|
/// <param name="validForFlag">Server Type</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool CanApplyFilter(Type type, ValidForFlag validForFlag)
|
public override bool CanApplyFilter(Type type, ValidForFlag validForFlag)
|
||||||
{
|
{
|
||||||
bool canApplyFilter = false;
|
bool canApplyFilter = false;
|
||||||
canApplyFilter = TypeToReverse == null || TypeToReverse == type;
|
canApplyFilter = TypeToReverse == null || TypeToReverse == type;
|
||||||
@@ -78,7 +78,7 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
/// Example of the output: (@ IsSystemObject = 0)
|
/// Example of the output: (@ IsSystemObject = 0)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string ToPropertyFilterString(Type type, ValidForFlag validForFlag)
|
public override string ToPropertyFilterString(Type type, ValidForFlag validForFlag)
|
||||||
{
|
{
|
||||||
// check first if the filter can be applied; if not just return empty string
|
// check first if the filter can be applied; if not just return empty string
|
||||||
if (!CanApplyFilter(type, validForFlag))
|
if (!CanApplyFilter(type, validForFlag))
|
||||||
@@ -186,7 +186,10 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
var escapedString = StringUtils.EscapeStringSQuote(propertyValue.ToString());
|
var escapedString = StringUtils.EscapeStringSQuote(propertyValue.ToString());
|
||||||
if (this.FilterType == FilterType.STARTSWITH || this.FilterType == FilterType.ENDSWITH)
|
if (this.FilterType == FilterType.STARTSWITH || this.FilterType == FilterType.ENDSWITH)
|
||||||
{
|
{
|
||||||
escapedString = EscapeLikeURNRegex().Replace(escapedString, "[$0]");
|
// For filters that use the LIKE operator, we need to escape the following characters: %, _, [, ^
|
||||||
|
// we do this by wrapping them in square brackets eg: [%], [_], [[], [^]
|
||||||
|
Regex escapteSqlObjectChars = new Regex(@"%|_|\[|\^");
|
||||||
|
escapedString = escapteSqlObjectChars.Replace(escapedString, "[$0]");
|
||||||
|
|
||||||
if (this.FilterType == FilterType.STARTSWITH)
|
if (this.FilterType == FilterType.STARTSWITH)
|
||||||
{
|
{
|
||||||
@@ -283,11 +286,6 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For filters that use the LIKE operator, we need to escape the following characters: %, _, [, ^
|
|
||||||
// we do this by wrapping them in square brackets eg: [%], [_], [[], [^]
|
|
||||||
[GeneratedRegexAttribute(@"%|_|\[|\^")]
|
|
||||||
public static partial Regex EscapeLikeURNRegex();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum FilterType
|
public enum FilterType
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.Nodes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ApplicableNodeChildFactories = new Lazy<Dictionary<string, HashSet<ChildFactory>>>(factories);
|
ApplicableNodeChildFactories = new Lazy<Dictionary<string, HashSet<ChildFactory>>>(() => factories);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<ChildFactory> GetApplicableChildFactories()
|
public IEnumerable<ChildFactory> GetApplicableChildFactories()
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.SmoModel
|
|||||||
{
|
{
|
||||||
NodeTypeDictionary.Add(containedType, new HashSet<Node>());
|
NodeTypeDictionary.Add(containedType, new HashSet<Node>());
|
||||||
}
|
}
|
||||||
NodeTypeDictionary.GetValueOrDefault(containedType).Add(node);
|
HashSet<Node> nodeSet;
|
||||||
|
NodeTypeDictionary.TryGetValue(containedType, out nodeSet);
|
||||||
|
nodeSet.Add(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var serverNode = TreeRoot.Nodes.FirstOrDefault(node => node.Name == "Server");
|
var serverNode = TreeRoot.Nodes.FirstOrDefault(node => node.Name == "Server");
|
||||||
@@ -59,7 +61,8 @@ namespace Microsoft.SqlTools.SqlCore.ObjectExplorer.SmoModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
var returnSet = new HashSet<string>();
|
var returnSet = new HashSet<string>();
|
||||||
var matchingNodes = NodeTypeDictionary.GetValueOrDefault(typeName);
|
HashSet<Node> matchingNodes;
|
||||||
|
NodeTypeDictionary.TryGetValue(typeName, out matchingNodes);
|
||||||
if (matchingNodes == null)
|
if (matchingNodes == null)
|
||||||
{
|
{
|
||||||
return returnSet;
|
return returnSet;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<PackageId>Microsoft.SqlTools.ManagedBatchParser.IntegrationTests</PackageId>
|
<PackageId>Microsoft.SqlTools.ManagedBatchParser.IntegrationTests</PackageId>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<PackageId>Microsoft.SqlTools.Migration.IntegrationTests</PackageId>
|
<PackageId>Microsoft.SqlTools.Migration.IntegrationTests</PackageId>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<PackageId>Microsoft.SqlTools.ServiceLayer.IntegrationTests</PackageId>
|
<PackageId>Microsoft.SqlTools.ServiceLayer.IntegrationTests</PackageId>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
<StartupObject>Microsoft.SqlTools.ServiceLayer.PerfTests.Program</StartupObject>
|
<StartupObject>Microsoft.SqlTools.ServiceLayer.PerfTests.Program</StartupObject>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<DefineConstants>$(DefineConstants);NETCOREAPP1_0;TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);NETCOREAPP1_0;TRACE</DefineConstants>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Moq" />
|
<PackageReference Include="Moq" />
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
|
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
<StartupObject />
|
<StartupObject />
|
||||||
<!-- False alerts, disabled due to issue: https://github.com/dotnet/roslyn/issues/65850 -->
|
<!-- False alerts, disabled due to issue: https://github.com/dotnet/roslyn/issues/65850 -->
|
||||||
<NoWarn>$(NoWarn);CS8795</NoWarn>
|
<NoWarn>$(NoWarn);CS8795</NoWarn>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" />
|
<PackageReference Include="System.Text.Encoding.CodePages" />
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<PackageId>Microsoft.SqlTools.Test.CompletionExtension</PackageId>
|
<PackageId>Microsoft.SqlTools.Test.CompletionExtension</PackageId>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
|
<ProjectReference Include="../../src/Microsoft.SqlTools.ServiceLayer/Microsoft.SqlTools.ServiceLayer.csproj" />
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user