Skip to content

Commit

Permalink
Add copy task
Browse files Browse the repository at this point in the history
  • Loading branch information
zijchen committed Feb 15, 2024
1 parent f0833d1 commit 629804f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/Microsoft.Build.Sql/sdk/Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SqlServer.DacFx" Version="161.8089.0" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="Microsoft.SqlServer.DacFx" Version="162.2.82-preview" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.4" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="Microsoft.SqlServer.Server" Version="1.0.0" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="Microsoft.SqlServer.Types" Version="160.1000.6" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="System.ComponentModel.Composition" Version="4.5.0" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="System.IO.Packaging" Version="5.0.0" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" GeneratePathProperty="true" ExcludeAssets="all" />
<PackageReference Include="System.IO.Packaging" Version="8.0.0" GeneratePathProperty="true" ExcludeAssets="all" />
</ItemGroup>

<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
Expand Down
17 changes: 11 additions & 6 deletions src/Microsoft.Build.Sql/sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Condition="'$(NetCoreBuild)' == 'true'" Project="$(MSBuildSdksPath)/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.BeforeCommon.targets" />
<Target Name="AfterRestore" AfterTargets="Restore">
<Message Text="Hello from Microsoft.Build.Sql after restore" Importance="high" />
<PropertyGroup>
<NETCoreTargetsPath Condition="$(NETCoreTargetsPath) == ''">$(PkgMicrosoft_SqlServer_DacFx)\lib\netstandard2.1</NETCoreTargetsPath>
</PropertyGroup>


<Target Name="_CopyDllsForSqlBuild" AfterTargets="Restore">
<ItemGroup>
<__SqlBuildBinaries Include="$(PkgMicrosoft_SqlServer_DacFx)/lib/netstandard2.1/*.dll" />
<__SqlBuildBinaries Include="$(PkgMicrosoft_Data_SqlClient)/lib/netstandard2.1/Microsoft.Data.SqlClient.dll" />
<__SqlBuildBinaries Include="$(PkgMicrosoft_SqlServer_Server)/lib/netstandard2.0/Microsoft.SqlServer.Server.dll" />
<__SqlBuildBinaries Include="$(PkgMicrosoft_SqlServer_Types)/lib/netstandard2.1/Microsoft.SqlServer.Types.dll" />
<__SqlBuildBinaries Include="$(PkgSystem_ComponentModel_Composition)/lib/net6.0/System.ComponentModel.Composition.dll" />
<__SqlBuildBinaries Include="$(PkgSystem_IO_Packaging)/lib/netstandard2.0/System.IO.Packaging.dll" />
</ItemGroup>
<Copy SourceFiles="@(__SqlBuildBinaries)" DestinationFolder="$(NETCoreTargetsPath)" SkipUnchangedFiles="true" />
</Target>

<!-- Pack target properties -->
Expand Down

0 comments on commit 629804f

Please sign in to comment.