mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Add dotnet tool build steps to SQL Tools & Kusto csproj files. (#1573)
This commit is contained in:
@@ -20,6 +20,12 @@
|
|||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
||||||
|
<PackAsTool>true</PackAsTool>
|
||||||
|
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
||||||
|
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Azure.OperationalInsights" />
|
<PackageReference Include="Microsoft.Azure.OperationalInsights" />
|
||||||
<PackageReference Include="Microsoft.SqlServer.DACFx" />
|
<PackageReference Include="Microsoft.SqlServer.DACFx" />
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ using Microsoft.SqlTools.ServiceLayer.InsightsGenerator;
|
|||||||
using Microsoft.SqlTools.ServiceLayer.LanguageExtensibility;
|
using Microsoft.SqlTools.ServiceLayer.LanguageExtensibility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.LanguageServices;
|
using Microsoft.SqlTools.ServiceLayer.LanguageServices;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Metadata;
|
using Microsoft.SqlTools.ServiceLayer.Metadata;
|
||||||
|
#if INCLUDE_MIGRATION
|
||||||
using Microsoft.SqlTools.ServiceLayer.Migration;
|
using Microsoft.SqlTools.ServiceLayer.Migration;
|
||||||
|
#endif
|
||||||
using Microsoft.SqlTools.ServiceLayer.Profiler;
|
using Microsoft.SqlTools.ServiceLayer.Profiler;
|
||||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution;
|
using Microsoft.SqlTools.ServiceLayer.QueryExecution;
|
||||||
using Microsoft.SqlTools.ServiceLayer.SchemaCompare;
|
using Microsoft.SqlTools.ServiceLayer.SchemaCompare;
|
||||||
@@ -159,8 +161,10 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
InsightsGeneratorService.Instance.InitializeService(serviceHost);
|
InsightsGeneratorService.Instance.InitializeService(serviceHost);
|
||||||
serviceProvider.RegisterSingleService(InsightsGeneratorService.Instance);
|
serviceProvider.RegisterSingleService(InsightsGeneratorService.Instance);
|
||||||
|
|
||||||
|
#if INCLUDE_MIGRATION
|
||||||
MigrationService.Instance.InitializeService(serviceHost);
|
MigrationService.Instance.InitializeService(serviceHost);
|
||||||
serviceProvider.RegisterSingleService(MigrationService.Instance);
|
serviceProvider.RegisterSingleService(MigrationService.Instance);
|
||||||
|
#endif
|
||||||
|
|
||||||
TableDesignerService.Instance.InitializeService(serviceHost);
|
TableDesignerService.Instance.InitializeService(serviceHost);
|
||||||
serviceProvider.RegisterSingleService(TableDesignerService.Instance);
|
serviceProvider.RegisterSingleService(TableDesignerService.Instance);
|
||||||
|
|||||||
@@ -19,6 +19,32 @@
|
|||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<Choose>
|
||||||
|
<When Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
||||||
|
<PropertyGroup>
|
||||||
|
<PackAsTool>true</PackAsTool>
|
||||||
|
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
||||||
|
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="**/*.cs" Exclude="**/obj/**/*.cs;Migration/**/*.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</When>
|
||||||
|
<Otherwise>
|
||||||
|
<PropertyGroup>
|
||||||
|
<DefineConstants>$(DefineConstants);INCLUDE_MIGRATION</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.SqlServer.Migration.Assessment" />
|
||||||
|
<Content Include="./Migration/Metadata/**">
|
||||||
|
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Compile Include="**/*.cs" Exclude="**/obj/**/*.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Otherwise>
|
||||||
|
</Choose>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Azure.Storage.Blobs" />
|
<PackageReference Include="Azure.Storage.Blobs" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
|
||||||
@@ -28,16 +54,12 @@
|
|||||||
<PackageReference Include="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" />
|
<PackageReference Include="Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider" />
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" />
|
<PackageReference Include="System.Text.Encoding.CodePages" />
|
||||||
<PackageReference Include="Microsoft.SqlServer.Assessment" />
|
<PackageReference Include="Microsoft.SqlServer.Assessment" />
|
||||||
<PackageReference Include="Microsoft.SqlServer.Migration.Assessment" />
|
|
||||||
<PackageReference Include="Microsoft.SqlServer.Management.SqlParser" />
|
<PackageReference Include="Microsoft.SqlServer.Management.SqlParser" />
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages" />
|
<PackageReference Include="System.Text.Encoding.CodePages" />
|
||||||
<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom.NRT">
|
<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom.NRT">
|
||||||
<Aliases>ASAScriptDom</Aliases>
|
<Aliases>ASAScriptDom</Aliases>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="**\*.cs" Exclude="**/obj/**/*.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.Hosting/Microsoft.SqlTools.Hosting.csproj" />
|
||||||
<ProjectReference Include="../Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.Credentials/Microsoft.SqlTools.Credentials.csproj" />
|
||||||
@@ -51,10 +73,6 @@
|
|||||||
<Content Include="..\..\Notice.txt">
|
<Content Include="..\..\Notice.txt">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include=".\Migration\Metadata\**">
|
|
||||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<EmbeddedResource Include="ObjectExplorer\SmoModel\TreeNodeDefinition.xml" />
|
<EmbeddedResource Include="ObjectExplorer\SmoModel\TreeNodeDefinition.xml" />
|
||||||
<EmbeddedResource Include="Localization\*.resx" />
|
<EmbeddedResource Include="Localization\*.resx" />
|
||||||
<None Include="Localization\sr.strings" />
|
<None Include="Localization\sr.strings" />
|
||||||
|
|||||||
@@ -15,6 +15,23 @@
|
|||||||
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.ServiceLayer.UnitTests/Microsoft.SqlTools.ServiceLayer.UnitTests.csproj" />
|
||||||
<ProjectReference Include="../Microsoft.SqlTools.Test.CompletionExtension/Microsoft.SqlTools.Test.CompletionExtension.csproj" />
|
<ProjectReference Include="../Microsoft.SqlTools.Test.CompletionExtension/Microsoft.SqlTools.Test.CompletionExtension.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Choose>
|
||||||
|
<When Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Migration\*" />
|
||||||
|
</ItemGroup>
|
||||||
|
</When>
|
||||||
|
<Otherwise>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\..\src\Microsoft.SqlTools.ServiceLayer\Migration\Metadata\**">
|
||||||
|
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
</Otherwise>
|
||||||
|
</Choose>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Moq" />
|
<PackageReference Include="Moq" />
|
||||||
<PackageReference Include="System.Net.Http" />
|
<PackageReference Include="System.Net.Http" />
|
||||||
@@ -32,10 +49,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Remove=".\Agent\NotebookResources\TestNotebook.ipynb" />
|
<Content Remove=".\Agent\NotebookResources\TestNotebook.ipynb" />
|
||||||
<EmbeddedResource Include=".\Agent\NotebookResources\TestNotebook.ipynb" />
|
<EmbeddedResource Include=".\Agent\NotebookResources\TestNotebook.ipynb" />
|
||||||
<Content Include="..\..\src\Microsoft.SqlTools.ServiceLayer\Migration\Metadata\**">
|
|
||||||
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="AzureFunctions\AzureFunctionTestFiles\*" />
|
<Compile Remove="AzureFunctions\AzureFunctionTestFiles\*" />
|
||||||
|
|||||||
Reference in New Issue
Block a user