Skip to content

Commit c1f4671

Browse files
Charles-GagnonMaddyDevlucyzhang929
authored
Merge latest from main into trigger (#866)
* Fix the race condition by adding the extension reference to build first. (#839) * fix the correct path separator * add the extension ref to avoid race condition * format files * pack and copy the sql nupkg to local-packages after build (#853) * copy to local packages before build * AfterTargets since package is created after build * make sure pack runs after build * address comments * Remove doc/sample references to preview bundle (#744) * Remove doc/sample references to preview bundle * Few more * undo * Powershell -> PowerShell * fix version * use scriptdom nuget (#864) * Revert "Remove doc/sample references to preview bundle (#744)" This reverts commit d7cd728. * Fix nuget package versioning --------- Co-authored-by: Maddy <12754347+MaddyDev@users.noreply.github.com> Co-authored-by: Lucy Zhang <luczhan@microsoft.com>
1 parent fbb87b1 commit c1f4671

File tree

9 files changed

+49
-14
lines changed

9 files changed

+49
-14
lines changed

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" Version="5.0.0" />
2929
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
3030
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
31+
<PackageVersion Include="Microsoft.SqlServer.TransactSql.ScriptDom" Version="161.8817.2" />
3132
</ItemGroup>
3233
</Project>
-4.45 MB
Binary file not shown.

performance/packages.lock.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,7 @@
18631863
"Microsoft.AspNetCore.Http": "[2.2.2, )",
18641864
"Microsoft.Azure.WebJobs": "[3.0.36, )",
18651865
"Microsoft.Data.SqlClient": "[5.0.1, )",
1866+
"Microsoft.SqlServer.TransactSql.ScriptDom": "[161.8817.2, )",
18661867
"Newtonsoft.Json": "[13.0.2, )",
18671868
"System.Runtime.Caching": "[5.0.0, )",
18681869
"morelinq": "[3.3.2, )"
@@ -2048,6 +2049,12 @@
20482049
"Microsoft.TestPlatform.TestHost": "17.4.0"
20492050
}
20502051
},
2052+
"Microsoft.SqlServer.TransactSql.ScriptDom": {
2053+
"type": "CentralTransitive",
2054+
"requested": "[161.8817.2, )",
2055+
"resolved": "161.8817.2",
2056+
"contentHash": "3j5dQjTPLw51AvXwJTL9sXiTMTY5Y2lvdzjtV7yOEsPUSIl+P2IsxLn7KFhGGHtwr4MOsUdAWnQ3xcrpG8tTXA=="
2057+
},
20512058
"Moq": {
20522059
"type": "CentralTransitive",
20532060
"requested": "[4.18.2, )",

samples/samples-csharp/packages.lock.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,6 +1723,7 @@
17231723
"Microsoft.AspNetCore.Http": "[2.2.2, )",
17241724
"Microsoft.Azure.WebJobs": "[3.0.36, )",
17251725
"Microsoft.Data.SqlClient": "[5.0.1, )",
1726+
"Microsoft.SqlServer.TransactSql.ScriptDom": "[161.8817.2, )",
17261727
"Newtonsoft.Json": "[13.0.2, )",
17271728
"System.Runtime.Caching": "[5.0.0, )",
17281729
"morelinq": "[3.3.2, )"
@@ -1823,6 +1824,12 @@
18231824
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
18241825
}
18251826
},
1827+
"Microsoft.SqlServer.TransactSql.ScriptDom": {
1828+
"type": "CentralTransitive",
1829+
"requested": "[161.8817.2, )",
1830+
"resolved": "161.8817.2",
1831+
"contentHash": "3j5dQjTPLw51AvXwJTL9sXiTMTY5Y2lvdzjtV7yOEsPUSIl+P2IsxLn7KFhGGHtwr4MOsUdAWnQ3xcrpG8tTXA=="
1832+
},
18261833
"morelinq": {
18271834
"type": "CentralTransitive",
18281835
"requested": "[3.3.2, )",

samples/samples-outofproc/Microsoft.Azure.WebJobs.Extensions.Sql.SamplesOutOfProc.csproj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
<PackageReference Include="Newtonsoft.Json" />
1515
</ItemGroup>
1616
<ItemGroup>
17-
<ProjectReference Include="../../Worker.Extensions.Sql/src/Microsoft.Azure.Functions.Worker.Extensions.Sql.csproj" />
17+
<ProjectReference
18+
Include="..\..\Worker.Extensions.Sql\src\Microsoft.Azure.Functions.Worker.Extensions.Sql.csproj" />
19+
<!-- We want to build the extension project first since this project references the package
20+
produced by building that. But we don't want it as an actual runtime depdendency -->
21+
<ProjectReference Include="..\..\src\Microsoft.Azure.WebJobs.Extensions.Sql.csproj"
22+
ReferenceOutputAssembly="false" />
1823
</ItemGroup>
1924
<ItemGroup>
2025
<None Update="host.json">

src/Microsoft.Azure.WebJobs.Extensions.Sql.csproj

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<!-- Default Version for dev -->
1010
<Version>99.99.99</Version>
1111
<IsPackable>true</IsPackable>
12-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1312
<PackageId>Microsoft.Azure.WebJobs.Extensions.Sql</PackageId>
1413
<PackageTags>Microsoft Azure WebJobs AzureFunctions SQL AzureSQL</PackageTags>
1514
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
@@ -20,6 +19,7 @@
2019
<PackageReference Include="Microsoft.Azure.WebJobs" />
2120
<PackageReference Include="Microsoft.Data.SqlClient" />
2221
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
22+
<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom" />
2323
<PackageReference Include="morelinq" />
2424
<PackageReference Include="System.Runtime.Caching" />
2525
<PackageReference Include="Newtonsoft.Json" />
@@ -30,24 +30,21 @@
3030
</ItemGroup>
3131

3232
<ItemGroup>
33-
<!-- ScriptDom is currently only available officially through the DacFx NuGet package. Rather than referencing DacFx
34-
for one ScriptDom API, we are getting the ScriptDom dll from the latest DacFx NuGet package. -->
35-
<Reference Include="Microsoft.SqlServer.TransactSql.ScriptDom">
36-
<HintPath>..\lib\Microsoft.SqlServer.TransactSql.ScriptDom.dll</HintPath>
37-
</Reference>
3833
<None Include="..\Images\pkgicon.png" Pack="true" PackagePath="" />
39-
<None Include="..\lib\Microsoft.SqlServer.TransactSql.ScriptDom.dll" Pack="true" PackagePath="lib/$(TargetFramework)" />
4034
<None Include="..\README.md" Pack="true" PackagePath="" />
4135
</ItemGroup>
42-
<Target Name="CopyNupkg" AfterTargets="Pack">
36+
<Target Name="PackAndCopyNupkg" AfterTargets="Build">
37+
<!-- Removed the GeneratePackageOnBuild and adding this explicit Pack command to run post build
38+
and also adding the copy package to local-packages to be available for the worker extension project. -->
39+
<Exec Command="dotnet pack &quot;$(MSBuildProjectDirectory)\$(PackageId).csproj&quot; --no-build --include-symbols -p:Version=$(Version)" />
4340
<ItemGroup>
4441
<_Packages Include=".\bin\$(Configuration)\*.nupkg" />
4542
</ItemGroup>
46-
<Copy SourceFiles="@(_Packages)" DestinationFolder="../local-packages" />
43+
<Copy SourceFiles="@(_Packages)" DestinationFolder="..\local-packages" />
4744
<Message Text="Copied sql .nupkg to local-packages" Importance="high" />
4845
</Target>
4946
<Target Name="RemoveNugetPackageCache" BeforeTargets="Build">
50-
<RemoveDir Directories="$(NugetPackageRoot)/$(PackageId.ToLower())/99.99.99"></RemoveDir>
51-
<Message Text="Deleted nuget cache for $(PackageId.ToLower())/99.99.99" Importance="high" />
47+
<RemoveDir Directories="$(NugetPackageRoot)\$(PackageId.ToLower())\$(Version)"></RemoveDir>
48+
<Message Text="Deleted nuget cache for $(PackageId.ToLower())\$(Version)" Importance="high" />
5249
</Target>
5350
</Project>

src/packages.lock.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@
7979
"Microsoft.SourceLink.Common": "1.1.1"
8080
}
8181
},
82+
"Microsoft.SqlServer.TransactSql.ScriptDom": {
83+
"type": "Direct",
84+
"requested": "[161.8817.2, )",
85+
"resolved": "161.8817.2",
86+
"contentHash": "3j5dQjTPLw51AvXwJTL9sXiTMTY5Y2lvdzjtV7yOEsPUSIl+P2IsxLn7KFhGGHtwr4MOsUdAWnQ3xcrpG8tTXA=="
87+
},
8288
"morelinq": {
8389
"type": "Direct",
8490
"requested": "[3.3.2, )",

test-outofproc/test-outofproc.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
<PackageReference Include="Microsoft.NET.Test.Sdk" />
1616
</ItemGroup>
1717
<ItemGroup>
18-
<ProjectReference Include="..\Worker.Extensions.Sql\src\Microsoft.Azure.Functions.Worker.Extensions.Sql.csproj" />
18+
<ProjectReference
19+
Include="..\Worker.Extensions.Sql\src\Microsoft.Azure.Functions.Worker.Extensions.Sql.csproj" />
20+
<!-- We want to build the extension project first since this project references the package
21+
produced by building that. But we don't want it as an actual runtime depdendency -->
22+
<ProjectReference Include="..\src\Microsoft.Azure.WebJobs.Extensions.Sql.csproj"
23+
ReferenceOutputAssembly="false" />
1924
</ItemGroup>
2025
<ItemGroup>
2126
<None Update="host.json">
@@ -27,6 +32,6 @@
2732
</None>
2833
</ItemGroup>
2934
<ItemGroup>
30-
<Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext"/>
35+
<Using Include="System.Threading.ExecutionContext" Alias="ExecutionContext" />
3136
</ItemGroup>
3237
</Project>

test/packages.lock.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,7 @@
18691869
"Microsoft.AspNetCore.Http": "[2.2.2, )",
18701870
"Microsoft.Azure.WebJobs": "[3.0.36, )",
18711871
"Microsoft.Data.SqlClient": "[5.0.1, )",
1872+
"Microsoft.SqlServer.TransactSql.ScriptDom": "[161.8817.2, )",
18721873
"Newtonsoft.Json": "[13.0.2, )",
18731874
"System.Runtime.Caching": "[5.0.0, )",
18741875
"morelinq": "[3.3.2, )"
@@ -1980,6 +1981,12 @@
19801981
"System.Text.Encodings.Web": "4.7.2"
19811982
}
19821983
},
1984+
"Microsoft.SqlServer.TransactSql.ScriptDom": {
1985+
"type": "CentralTransitive",
1986+
"requested": "[161.8817.2, )",
1987+
"resolved": "161.8817.2",
1988+
"contentHash": "3j5dQjTPLw51AvXwJTL9sXiTMTY5Y2lvdzjtV7yOEsPUSIl+P2IsxLn7KFhGGHtwr4MOsUdAWnQ3xcrpG8tTXA=="
1989+
},
19831990
"morelinq": {
19841991
"type": "CentralTransitive",
19851992
"requested": "[3.3.2, )",

0 commit comments

Comments
 (0)