mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Build Managed Batch Parser NuGet package (#1747)
This commit is contained in:
@@ -3,8 +3,26 @@
|
|||||||
<HighEntropyVA>true</HighEntropyVA>
|
<HighEntropyVA>true</HighEntropyVA>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
</PropertyGroup>
|
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
|
||||||
<PropertyGroup>
|
|
||||||
|
<!-- Defaults-->
|
||||||
|
<Major Condition="$(Major) == ''">1</Major>
|
||||||
|
<Minor Condition="$(Minor) == ''">0</Minor>
|
||||||
|
<Build_BuildNumber Condition="'$(Build_BuildNumber)' == ''">0.0</Build_BuildNumber>
|
||||||
|
<StableRelease Condition="$(StableRelease) == ''">false</StableRelease>
|
||||||
|
|
||||||
|
<!-- AssemblyVersion should not change for non-major releases. -->
|
||||||
|
<AssemblyVersion>$(Major).0.0.0</AssemblyVersion>
|
||||||
|
|
||||||
|
<!-- AssemblyFileVersion should change for every build. -->
|
||||||
|
<!-- For preview releases, sample Version = 3.0.20221104.1-preview -->
|
||||||
|
<!-- For stable releases, sample Version = 3.0.0 -->
|
||||||
|
<VersionPrefix>$(Major).$(Minor).$(Build_BuildNumber)</VersionPrefix>
|
||||||
|
<VersionPrefix Condition="$(StableRelease.Equals('true'))">$(Major).$(Minor).0</VersionPrefix>
|
||||||
|
<VersionSuffix Condition="!$(StableRelease.Equals('true'))">preview</VersionSuffix>
|
||||||
|
<AssemblyFileVersion>$(VersionPrefix)-$(VersionSuffix)</AssemblyFileVersion>
|
||||||
|
<NuspecProperties>version=$(PackageVersion)</NuspecProperties>
|
||||||
|
|
||||||
<ToolsServiceTargetRuntimes>win-x64;win-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;osx-x64;osx-arm64;linux-x64</ToolsServiceTargetRuntimes>
|
<ToolsServiceTargetRuntimes>win-x64;win-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;osx-x64;osx-arm64;linux-x64</ToolsServiceTargetRuntimes>
|
||||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Update="Newtonsoft.Json" Version="13.0.1" />
|
|
||||||
|
|
||||||
<PackageReference Update="System.Net.Http" Version="4.3.4" />
|
<PackageReference Update="System.Net.Http" Version="4.3.4" />
|
||||||
<PackageReference Update="System.IO.Packaging" Version="4.7.0" />
|
<PackageReference Update="System.IO.Packaging" Version="4.7.0" />
|
||||||
<PackageReference Update="System.Runtime.Loader" Version="4.3.0" />
|
<PackageReference Update="System.Runtime.Loader" Version="4.3.0" />
|
||||||
<PackageReference Update="System.Composition" Version="1.4.1" />
|
<PackageReference Update="System.Composition" Version="1.4.1" />
|
||||||
<PackageReference Update="System.Security.Permissions" Version="6.0.0" />
|
<PackageReference Update="System.Security.Permissions" Version="6.0.0" />
|
||||||
<PackageReference Update="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
|
||||||
<PackageReference Update="System.Text.Encoding.CodePages" Version="5.0.0" />
|
<PackageReference Update="System.Text.Encoding.CodePages" Version="5.0.0" />
|
||||||
<PackageReference Update="System.Text.Encodings.Web" Version="4.7.2" />
|
<PackageReference Update="System.Text.Encodings.Web" Version="4.7.2" />
|
||||||
<PackageReference Update="System.Reactive.Core" Version="5.0.0" />
|
<PackageReference Update="System.Reactive.Core" Version="5.0.0" />
|
||||||
@@ -20,8 +17,6 @@
|
|||||||
<PackageReference Update="Microsoft.Azure.Management.Sql" Version="1.41.0-preview" />
|
<PackageReference Update="Microsoft.Azure.Management.Sql" Version="1.41.0-preview" />
|
||||||
|
|
||||||
<PackageReference Update="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="1.1.1" />
|
<PackageReference Update="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" Version="1.1.1" />
|
||||||
<PackageReference Update="Microsoft.Data.SqlClient" Version="5.0.1" />
|
|
||||||
<PackageReference Update="Microsoft.SqlServer.SqlManagementObjects" Version="170.8.0" />
|
|
||||||
<PackageReference Update="Microsoft.SqlServer.Management.SmoMetadataProvider" Version="170.8.0" />
|
<PackageReference Update="Microsoft.SqlServer.Management.SmoMetadataProvider" Version="170.8.0" />
|
||||||
<PackageReference Update="Microsoft.SqlServer.DacFx" Version="161.6367.0-preview" />
|
<PackageReference Update="Microsoft.SqlServer.DacFx" Version="161.6367.0-preview" />
|
||||||
<PackageReference Update="Microsoft.Azure.Kusto.Data" Version="9.0.4" />
|
<PackageReference Update="Microsoft.Azure.Kusto.Data" Version="9.0.4" />
|
||||||
@@ -34,6 +29,7 @@
|
|||||||
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" />
|
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" />
|
||||||
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.10.0" />
|
<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.10.0" />
|
||||||
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="3.10.0" />
|
<PackageReference Update="Microsoft.CodeAnalysis.Workspaces.Common" Version="3.10.0" />
|
||||||
|
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
|
||||||
|
|
||||||
<PackageReference Update="Moq" Version="4.8.2" />
|
<PackageReference Update="Moq" Version="4.8.2" />
|
||||||
<PackageReference Update="nunit" Version="3.12.0" />
|
<PackageReference Update="nunit" Version="3.12.0" />
|
||||||
@@ -47,4 +43,13 @@
|
|||||||
<PackageReference Update="coverlet.collector" Version="3.1.2" />
|
<PackageReference Update="coverlet.collector" Version="3.1.2" />
|
||||||
<PackageReference Update="coverlet.msbuild" Version="3.1.2" />
|
<PackageReference Update="coverlet.msbuild" Version="3.1.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- When updating version of Dependencies in the below section, please also update the version in the following files:
|
||||||
|
packages\Microsoft.SqlTools.ManagedBatchParser\Microsoft.SqlTools.ManagedBatchParser.nuspec-->
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Update="Microsoft.Data.SqlClient" Version="5.0.1" />
|
||||||
|
<PackageReference Update="Microsoft.SqlServer.SqlManagementObjects" Version="170.8.0" />
|
||||||
|
<PackageReference Update="Newtonsoft.Json" Version="13.0.1" />
|
||||||
|
<PackageReference Update="System.Configuration.ConfigurationManager" Version="6.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
BIN
SQL2003.snk
Normal file
BIN
SQL2003.snk
Normal file
Binary file not shown.
@@ -3,6 +3,18 @@ pr: none
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: Build
|
- stage: Build
|
||||||
|
variables:
|
||||||
|
- name: buildConfiguration
|
||||||
|
value: 'Release'
|
||||||
|
# Major version number for the release
|
||||||
|
- name: Major
|
||||||
|
value: '3'
|
||||||
|
# Minor version number for the release (should be incremented post a stable release)
|
||||||
|
- name: Minor
|
||||||
|
value: '0'
|
||||||
|
# Set to true to build a stable release.
|
||||||
|
- name: StableRelease
|
||||||
|
value: 'false'
|
||||||
jobs:
|
jobs:
|
||||||
- job: Build
|
- job: Build
|
||||||
pool:
|
pool:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
filename: build.cmd
|
filename: build.cmd
|
||||||
arguments: '-target=all -mono'
|
arguments: '-target=all -mono'
|
||||||
|
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: 'dotnet restore test/Microsoft.SqlTools.ServiceLayer.UnitTests'
|
displayName: 'dotnet restore test/Microsoft.SqlTools.ServiceLayer.UnitTests'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -49,6 +49,27 @@ steps:
|
|||||||
codeCoverageTool: 'Cobertura'
|
codeCoverageTool: 'Cobertura'
|
||||||
summaryFileLocation: '$(Agent.TempDirectory)/coverlet/reports/Cobertura.xml'
|
summaryFileLocation: '$(Agent.TempDirectory)/coverlet/reports/Cobertura.xml'
|
||||||
|
|
||||||
|
- task: PowerShell@2
|
||||||
|
displayName: 'Generate Nuspec Version'
|
||||||
|
inputs:
|
||||||
|
targetType: 'inline'
|
||||||
|
script: |
|
||||||
|
$propsFile = '$(Build.SourcesDirectory)\Directory.Build.Props'
|
||||||
|
$props = New-Object XML
|
||||||
|
$props.Load($propsFile)
|
||||||
|
$propGroup = $props.Project.PropertyGroup;
|
||||||
|
$versionPre = $env:Major + '.' + $env:Minor + '.'
|
||||||
|
if($env:StableRelease.Equals('true')) {
|
||||||
|
$version = $versionPre + '0';
|
||||||
|
} else {
|
||||||
|
$version = $versionPre + $(Build.BuildNumber) + '-' + $propGroup.VersionSuffix.'#text'
|
||||||
|
}
|
||||||
|
$nuspecFile = '$(Build.SourcesDirectory)\packages\Microsoft.SqlTools.ManagedBatchParser\Microsoft.SqlTools.ManagedBatchParser.nuspec'
|
||||||
|
$nuspec = New-Object XML
|
||||||
|
$nuspec.Load($nuspecFile)
|
||||||
|
$nuspec.package.metadata.version = $version;
|
||||||
|
$nuspec.Save($nuspecFile)
|
||||||
|
|
||||||
- task: Npm@1
|
- task: Npm@1
|
||||||
displayName: 'npm install -g gulp-cli'
|
displayName: 'npm install -g gulp-cli'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -56,6 +77,33 @@ steps:
|
|||||||
verbose: false
|
verbose: false
|
||||||
customCommand: 'install -g gulp-cli'
|
customCommand: 'install -g gulp-cli'
|
||||||
|
|
||||||
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
|
displayName: 'ESRP CodeSigning - SNK only'
|
||||||
|
inputs:
|
||||||
|
ConnectedServiceName: 'Code Signing'
|
||||||
|
FolderPath: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/default/net472/'
|
||||||
|
Pattern: 'Microsoft.SqlTools.ManagedBatchParser.dll'
|
||||||
|
signConfigType: inlineSignParams
|
||||||
|
inlineOperation: |
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"KeyCode" : "CP-235847-SN",
|
||||||
|
"operationSetCode" : "StrongNameSign",
|
||||||
|
"Parameters" : [],
|
||||||
|
"ToolName" : "sign",
|
||||||
|
"ToolVersion" : "1.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"KeyCode" : "CP-235847-SN",
|
||||||
|
"operationSetCode" : "StrongNameVerify",
|
||||||
|
"Parameters" : [],
|
||||||
|
"ToolName" : "sign",
|
||||||
|
"ToolVersion" : "1.0"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
SessionTimeout: 600
|
||||||
|
MaxConcurrency: 5
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
displayName: 'ESRP CodeSigning - sha256 only'
|
displayName: 'ESRP CodeSigning - sha256 only'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -114,7 +162,7 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
filename: build.cmd
|
filename: build.cmd
|
||||||
arguments: '-target=dotnetpackpublished -mono'
|
arguments: '-target=dotnetpackpublished -mono'
|
||||||
|
|
||||||
- task: BatchScript@1
|
- task: BatchScript@1
|
||||||
displayName: "Build and Package service tool projects"
|
displayName: "Build and Package service tool projects"
|
||||||
env:
|
env:
|
||||||
|
|||||||
63
build.cake
63
build.cake
@@ -17,6 +17,7 @@ using XliffParser;
|
|||||||
// Basic arguments
|
// Basic arguments
|
||||||
var target = Argument("target", "Default");
|
var target = Argument("target", "Default");
|
||||||
var configuration = Argument("configuration", "Release");
|
var configuration = Argument("configuration", "Release");
|
||||||
|
|
||||||
// Optional arguments
|
// Optional arguments
|
||||||
var testConfiguration = Argument("test-configuration", "Debug");
|
var testConfiguration = Argument("test-configuration", "Debug");
|
||||||
var installFolder = Argument("install-path", System.IO.Path.Combine(Environment.GetEnvironmentVariable(IsRunningOnWindows() ? "USERPROFILE" : "HOME"),
|
var installFolder = Argument("install-path", System.IO.Path.Combine(Environment.GetEnvironmentVariable(IsRunningOnWindows() ? "USERPROFILE" : "HOME"),
|
||||||
@@ -36,6 +37,8 @@ var shellExtension = IsRunningOnWindows() ? "ps1" : "sh";
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class BuildPlan
|
public class BuildPlan
|
||||||
{
|
{
|
||||||
|
public string[] 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; }
|
||||||
@@ -62,6 +65,7 @@ var buildPlan = JsonConvert.DeserializeObject<BuildPlan>(
|
|||||||
var dotnetFolder = System.IO.Path.Combine(workingDirectory, buildPlan.DotNetFolder);
|
var dotnetFolder = System.IO.Path.Combine(workingDirectory, buildPlan.DotNetFolder);
|
||||||
var dotnetcli = buildPlan.UseSystemDotNetPath ? "dotnet" : System.IO.Path.Combine(System.IO.Path.GetFullPath(dotnetFolder), "dotnet");
|
var dotnetcli = buildPlan.UseSystemDotNetPath ? "dotnet" : System.IO.Path.Combine(System.IO.Path.GetFullPath(dotnetFolder), "dotnet");
|
||||||
var toolsFolder = System.IO.Path.Combine(workingDirectory, buildPlan.BuildToolsFolder);
|
var toolsFolder = System.IO.Path.Combine(workingDirectory, buildPlan.BuildToolsFolder);
|
||||||
|
var nugetcli = System.IO.Path.Combine(toolsFolder, "nuget.exe");
|
||||||
|
|
||||||
var sourceFolder = System.IO.Path.Combine(workingDirectory, "src");
|
var sourceFolder = System.IO.Path.Combine(workingDirectory, "src");
|
||||||
var testFolder = System.IO.Path.Combine(workingDirectory, "test");
|
var testFolder = System.IO.Path.Combine(workingDirectory, "test");
|
||||||
@@ -216,6 +220,7 @@ Task("Restore")
|
|||||||
Task("BuildTest")
|
Task("BuildTest")
|
||||||
.IsDependentOn("Setup")
|
.IsDependentOn("Setup")
|
||||||
.IsDependentOn("Restore")
|
.IsDependentOn("Restore")
|
||||||
|
.IsDependentOn("BuildFx")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
foreach (var pair in buildPlan.TestProjects)
|
foreach (var pair in buildPlan.TestProjects)
|
||||||
@@ -239,6 +244,33 @@ Task("BuildTest")
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Build .NET Framework projects.
|
||||||
|
/// </summary>
|
||||||
|
Task("BuildFx")
|
||||||
|
.IsDependentOn("Setup")
|
||||||
|
.IsDependentOn("Restore")
|
||||||
|
.Does(() =>
|
||||||
|
{
|
||||||
|
foreach (var project in buildPlan.FxBuildProjects)
|
||||||
|
{
|
||||||
|
foreach (var framework in buildPlan.FxFrameworks)
|
||||||
|
{
|
||||||
|
var projectFolder = System.IO.Path.Combine(sourceFolder, project);
|
||||||
|
var logPath = System.IO.Path.Combine(logFolder, $"{project}-{framework}-build.log");
|
||||||
|
using (var logWriter = new StreamWriter(logPath)) {
|
||||||
|
Run(dotnetcli, $"build --framework {framework} --configuration {configuration} \"{projectFolder}\"",
|
||||||
|
new RunOptions
|
||||||
|
{
|
||||||
|
StandardOutputWriter = logWriter,
|
||||||
|
StandardErrorWriter = logWriter
|
||||||
|
})
|
||||||
|
.ExceptionOnError($"Building test {project} failed for {framework}. See {logPath} for more details.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Packages projects specified in PackageProjects
|
/// Packages projects specified in PackageProjects
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -263,6 +295,7 @@ Task("DotnetPack")
|
|||||||
/// currently.
|
/// currently.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Task("DotnetPackPublished")
|
Task("DotnetPackPublished")
|
||||||
|
.IsDependentOn("DotnetPackNuspec")
|
||||||
.Does(() =>
|
.Does(() =>
|
||||||
{
|
{
|
||||||
foreach (var project in buildPlan.PackagePublishedProjects)
|
foreach (var project in buildPlan.PackagePublishedProjects)
|
||||||
@@ -274,6 +307,23 @@ Task("DotnetPackPublished")
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Packages projects specified in FxBuildProjects using available Nupecs, these projects require that publishing be done first. Note that we
|
||||||
|
/// don't do the publishing here because we need the binaries to be signed before being packaged up and that is done by the pipeline
|
||||||
|
/// currently.
|
||||||
|
/// </summary>
|
||||||
|
Task("DotnetPackNuspec")
|
||||||
|
.Does(() =>
|
||||||
|
{
|
||||||
|
foreach (var project in buildPlan.FxBuildProjects)
|
||||||
|
{
|
||||||
|
// For now, putting all nugets in the 1 directory
|
||||||
|
var outputFolder = System.IO.Path.Combine(nugetPackageFolder);
|
||||||
|
var projectFolder = System.IO.Path.Combine(packagesFolder, project);
|
||||||
|
DotnetPackNuspec(outputFolder, projectFolder, project);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Packages dotnet tool projects specified in DotnetToolProjects.
|
/// Packages dotnet tool projects specified in DotnetToolProjects.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -407,6 +457,19 @@ Task("OnlyPublish")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buildPlan.FxBuildProjects.Contains(project))
|
||||||
|
{
|
||||||
|
foreach(var framework in buildPlan.FxFrameworks)
|
||||||
|
{
|
||||||
|
var outputFolder = System.IO.Path.Combine(publishFolder, packageName, "default", framework);
|
||||||
|
var publishArguments = "publish";
|
||||||
|
publishArguments = $"{publishArguments} --framework {framework} --configuration {configuration}";
|
||||||
|
publishArguments = $"{publishArguments} --output \"{outputFolder}\" \"{projectFolder}\"";
|
||||||
|
Run(dotnetcli, publishArguments)
|
||||||
|
.ExceptionOnError($"Failed to publish {project} / {framework}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (requireArchive)
|
if (requireArchive)
|
||||||
{
|
{
|
||||||
foreach (var framework in buildPlan.Frameworks)
|
foreach (var framework in buildPlan.Frameworks)
|
||||||
|
|||||||
10
build.json
10
build.json
@@ -24,11 +24,19 @@
|
|||||||
"Frameworks": [
|
"Frameworks": [
|
||||||
"net6.0"
|
"net6.0"
|
||||||
],
|
],
|
||||||
|
"FxFrameworks":[
|
||||||
|
"net472",
|
||||||
|
"net6.0"
|
||||||
|
],
|
||||||
"MainProjects": [
|
"MainProjects": [
|
||||||
"Microsoft.SqlTools.Credentials",
|
"Microsoft.SqlTools.Credentials",
|
||||||
"Microsoft.SqlTools.ResourceProvider",
|
"Microsoft.SqlTools.ResourceProvider",
|
||||||
"Microsoft.Kusto.ServiceLayer",
|
"Microsoft.Kusto.ServiceLayer",
|
||||||
"Microsoft.SqlTools.ServiceLayer"
|
"Microsoft.SqlTools.ServiceLayer",
|
||||||
|
"Microsoft.SqlTools.ManagedBatchParser"
|
||||||
|
],
|
||||||
|
"FxBuildProjects": [
|
||||||
|
"Microsoft.SqlTools.ManagedBatchParser"
|
||||||
],
|
],
|
||||||
"PackageProjects": [
|
"PackageProjects": [
|
||||||
"Microsoft.SqlTools.Hosting"
|
"Microsoft.SqlTools.Hosting"
|
||||||
|
|||||||
@@ -9,12 +9,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OUTPUT_DIR>$(MSBuildThisFileDirectory)</OUTPUT_DIR>
|
<OUTPUT_DIR>$(MSBuildThisFileDirectory)</OUTPUT_DIR>
|
||||||
<PackageReleaseNotes></PackageReleaseNotes>
|
|
||||||
<!-- Currently we hardcode this because the build pipelines don't version the assemblies,
|
|
||||||
it's only the release pipeline that generates the tag to use for the Github release. This
|
|
||||||
is a workaround to get releases out until the pipelines can be refactored to pass in
|
|
||||||
the correct version -->
|
|
||||||
<PackageVersion>3.0.0-release.200</PackageVersion>
|
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<PackageIcon>images\sqlserver.png</PackageIcon>
|
<PackageIcon>images\sqlserver.png</PackageIcon>
|
||||||
<PackageIconFullPath></PackageIconFullPath>
|
<PackageIconFullPath></PackageIconFullPath>
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
|
<metadata>
|
||||||
|
<id>Microsoft.SqlTools.ManagedBatchParser</id>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<authors>Microsoft</authors>
|
||||||
|
<projectUrl>https://github.com/Microsoft/sqltoolsservice/</projectUrl>
|
||||||
|
<license type="expression">MIT</license>
|
||||||
|
<iconUrl>http://s.gravatar.com/avatar/6f39d8562df0a3509a8240fb281bc5bd?s=80</iconUrl>
|
||||||
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
|
<description>Managed Batch parser for Sql Tools Services.</description>
|
||||||
|
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||||
|
<tags>SQL Tools XPLAT Managed Batch Parser</tags>
|
||||||
|
<dependencies>
|
||||||
|
<group targetFramework="net472">
|
||||||
|
<dependency id="Microsoft.Data.SqlClient" version="5.0.1" />
|
||||||
|
<dependency id="Microsoft.SqlServer.SqlManagementObjects" version="170.8.0" />
|
||||||
|
<dependency id="Newtonsoft.Json" version="13.0.1" />
|
||||||
|
<dependency id="System.Configuration.ConfigurationManager" version="6.0.0" />
|
||||||
|
</group>
|
||||||
|
<group targetFramework="net6.0">
|
||||||
|
<dependency id="Microsoft.Data.SqlClient" version="5.0.1" />
|
||||||
|
<dependency id="Microsoft.SqlServer.SqlManagementObjects" version="170.8.0" />
|
||||||
|
<dependency id="Newtonsoft.Json" version="13.0.1" />
|
||||||
|
<dependency id="System.Configuration.ConfigurationManager" version="6.0.0" />
|
||||||
|
</group>
|
||||||
|
</dependencies>
|
||||||
|
</metadata>
|
||||||
|
<files>
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\de\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\de" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\es\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\es" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\fr\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\fr" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\it\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\it" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\ja\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\ja" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\ko\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\ko" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\pt-br\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\pt-br" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\ru\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\ru" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\zh-hans\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\zh-hans" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\zh-hant\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net472\zh-hant" />
|
||||||
|
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\Microsoft.SqlTools.ManagedBatchParser.dll" target="lib\net472" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\Microsoft.SqlTools.ManagedBatchParser.pdb" target="lib\net472" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net472\Microsoft.SqlTools.ManagedBatchParser.xml" target="lib\net472" />
|
||||||
|
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\de\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\de" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\es\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\es" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\fr\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\fr" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\it\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\it" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\ja\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\ja" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\ko\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\ko" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\pt-br\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\pt-br" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\ru\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\ru" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\zh-hans\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\zh-hans" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\zh-hant\Microsoft.SqlTools.ManagedBatchParser.resources.dll" target="lib\net6.0\zh-hant" />
|
||||||
|
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\Microsoft.SqlTools.ManagedBatchParser.dll" target="lib\net6.0" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\Microsoft.SqlTools.ManagedBatchParser.pdb" target="lib\net6.0" />
|
||||||
|
<file src="..\..\artifacts\publish\Microsoft.SqlTools.ServiceLayer\default\net6.0\Microsoft.SqlTools.ManagedBatchParser.xml" target="lib\net6.0" />
|
||||||
|
</files>
|
||||||
|
</package>
|
||||||
@@ -232,5 +232,19 @@ public void DotnetPack(string outputFolder, string projectFolder, string project
|
|||||||
})
|
})
|
||||||
.ExceptionOnError($"Packaging {project} failed. See {logPath} for details.");
|
.ExceptionOnError($"Packaging {project} failed. See {logPath} for details.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DotnetPackNuspec(string outputFolder, string projectFolder, string project) {
|
||||||
|
var logPath = System.IO.Path.Combine(logFolder, $"{project}-pack.log");
|
||||||
|
using (var logWriter = new StreamWriter(logPath)) {
|
||||||
|
Information($"Packaging {projectFolder}");
|
||||||
|
Run(nugetcli, $"pack {projectFolder}\\{project}.nuspec -OutputDirectory {outputFolder}",
|
||||||
|
new RunOptions
|
||||||
|
{
|
||||||
|
StandardOutputWriter = logWriter,
|
||||||
|
StandardErrorWriter = logWriter
|
||||||
|
})
|
||||||
|
.ExceptionOnError($"Packaging {project} failed. See {logPath} for details.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,15 @@
|
|||||||
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
|
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Company>Microsoft Corporation</Company>
|
<Company>Microsoft Corporation</Company>
|
||||||
<Product>Microsoft SQL Server</Product>
|
<Product>Microsoft Sql Tools</Product>
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<VersionPrefix>1.1.2</VersionPrefix>
|
|
||||||
<VersionSuffix></VersionSuffix>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors>Microsoft</Authors>
|
<Authors>Microsoft</Authors>
|
||||||
|
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||||
|
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
<Copyright>Copyright © Microsoft Corporation. All rights reserved.</Copyright>
|
||||||
<PackageLicenseUrl>https://github.com/Microsoft/sqltoolsservice/blob/master/license.txt</PackageLicenseUrl>
|
<PackageLicense>https://github.com/Microsoft/sqltoolsservice/blob/main/license.txt</PackageLicense>
|
||||||
<PackageIconUrl>http://s.gravatar.com/avatar/6f39d8562df0a3509a8240fb281bc5bd?s=80</PackageIconUrl>
|
<PackageIconUrl>http://s.gravatar.com/avatar/6f39d8562df0a3509a8240fb281bc5bd?s=80</PackageIconUrl>
|
||||||
<PackageProjectUrl>https://github.com/Microsoft/sqltoolsservice/</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Microsoft/sqltoolsservice/</PackageProjectUrl>
|
||||||
<PackageTags>SQL XPLAT</PackageTags>
|
<PackageTags>SQL XPLAT</PackageTags>
|
||||||
|
|||||||
@@ -4,9 +4,15 @@
|
|||||||
<TargetFrameworks>net6.0;net472</TargetFrameworks>
|
<TargetFrameworks>net6.0;net472</TargetFrameworks>
|
||||||
<LangVersion>9.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<AssemblyName>Microsoft.SqlTools.ManagedBatchParser</AssemblyName>
|
||||||
|
<Guid>82dd9738-2ad3-4eb3-9f80-18b594e03621</Guid>
|
||||||
|
<DelaySign>True</DelaySign>
|
||||||
|
<!-- Explicitly disable since it leads to compilation errors. The .NET 6.0 target is used in tests with internalsVisibleTo attribute.-->
|
||||||
|
<SignAssembly Condition="$(TargetFramework) == 'net472'">True</SignAssembly>
|
||||||
|
<AssemblyOriginatorKeyFile>$(RootDir)\SQL2003.snk</AssemblyOriginatorKeyFile>
|
||||||
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
|
||||||
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
|
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
|
||||||
|
<Product>Microsoft SqlTools Managed batch parser</Product>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Localization\transXliff\" />
|
<Folder Include="Localization\transXliff\" />
|
||||||
@@ -14,6 +20,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" />
|
<PackageReference Include="Microsoft.Data.SqlClient" />
|
||||||
<PackageReference Include="System.Configuration.ConfigurationManager" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" />
|
||||||
|
<PackageReference Include="Microsoft.SourceLink.GitHub"/>
|
||||||
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" />
|
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" />
|
||||||
<PackageReference Include="Newtonsoft.Json" />
|
<PackageReference Include="Newtonsoft.Json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -21,4 +28,12 @@
|
|||||||
<EmbeddedResource Include="Localization\*.resx" />
|
<EmbeddedResource Include="Localization\*.resx" />
|
||||||
<None Include="Localization\sr.strings" />
|
<None Include="Localization\sr.strings" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup Condition="$(TargetFramework) == 'net6.0'">
|
||||||
|
<InternalsVisibleTo Include="Microsoft.SqlTools.ServiceLayer.UnitTests" />
|
||||||
|
<InternalsVisibleTo Include="Microsoft.SqlTools.ServiceLayer.IntegrationTests" />
|
||||||
|
<InternalsVisibleTo Include="Microsoft.SqlTools.ServiceLayer.Test.Common" />
|
||||||
|
<InternalsVisibleTo Include="MicrosoftSqlToolsServiceLayer" />
|
||||||
|
<InternalsVisibleTo Include="MicrosoftKustoServiceLayer" />
|
||||||
|
<InternalsVisibleTo Include="Microsoft.SqlTools.ManagedBatchParser.IntegrationTests" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
//
|
|
||||||
// Copyright (c) Microsoft. All rights reserved.
|
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
||||||
//
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("Microsoft.SqlTools.ManagedBatchParser")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("Microsoft.SqlTools.ManagedBatchParser")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("82dd9738-2ad3-4eb3-9f80-18b594e03621")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
||||||
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.UnitTests")]
|
|
||||||
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.IntegrationTests")]
|
|
||||||
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ServiceLayer.Test.Common")]
|
|
||||||
[assembly: InternalsVisibleTo("MicrosoftSqlToolsServiceLayer")]
|
|
||||||
[assembly: InternalsVisibleTo("MicrosoftKustoServiceLayer")]
|
|
||||||
[assembly: InternalsVisibleTo("Microsoft.SqlTools.ManagedBatchParser.IntegrationTests")]
|
|
||||||
Reference in New Issue
Block a user