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