Skip to content

Commit ffd47a8

Browse files
RubenCerna2079aaronburtleAniruddh25
authored
Cherry-Pick: Add changes to fix Nuget Core Package Creation (#3633)
## Why make this change? This change cherry-picks the PRs that fixes the new Nuget Core Package ## What is this change? Cherry-picked PRs - #3617 - #3620 ## How was this tested? Existing tests in cherry-pick cover new changes. ## Sample Request(s) N/A --------- Co-authored-by: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
1 parent ab7fa7e commit ffd47a8

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

scripts/notice-generation.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ $sqlClientSNILicenseFilePath = "$BuildSourcesDir/external_licenses/Microsoft.Dat
1919
$sqlClientSNILicense = Get-Content -Path $sqlClientSNILicenseFilePath -Raw
2020

2121
# Replace erroneous copyright, using [System.IO.File] for better performance than Get-Content and Set-Content
22-
$content = [System.IO.File]::ReadAllText($noticeFilePath).Replace("(c) Microsoft 2023`r`n", "")
23-
$content = [System.IO.File]::ReadAllText($noticeFilePath).Replace("(c) Microsoft 2024`r`n", "")
22+
$content = [System.IO.File]::ReadAllText($noticeFilePath) -replace "\(c\) Microsoft (2023|2024)`r`n", ""
2423

2524
# Prepare license content for writing to file.
2625
$sqlClientSNIComponentName = "`r`nMICROSOFT.DATA.SQLCLIENT.SNI`r`n`r`n"

src/Core/Azure.DataApiBuilder.Core.csproj

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2121
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2222
<NoWarn>NU1603</NoWarn>
23+
24+
<!-- Run custom target during pack to add dependency files into the package. -->
25+
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);IncludeInternalDependenciesInPackage</TargetsForTfmSpecificContentInPackage>
2326
</PropertyGroup>
2427

2528
<ItemGroup>
@@ -54,9 +57,15 @@
5457
</PropertyGroup>
5558

5659
<ItemGroup>
57-
<ProjectReference Include="..\Auth\Azure.DataApiBuilder.Auth.csproj" />
58-
<ProjectReference Include="..\Config\Azure.DataApiBuilder.Config.csproj" />
59-
<ProjectReference Include="..\Service.GraphQLBuilder\Azure.DataApiBuilder.Service.GraphQLBuilder.csproj" />
60+
<ProjectReference Include="..\Auth\Azure.DataApiBuilder.Auth.csproj">
61+
<PrivateAssets Condition="'$(PrivatizeAssets)' == 'true'">all</PrivateAssets>
62+
</ProjectReference>
63+
<ProjectReference Include="..\Config\Azure.DataApiBuilder.Config.csproj">
64+
<PrivateAssets Condition="'$(PrivatizeAssets)' == 'true'">all</PrivateAssets>
65+
</ProjectReference>
66+
<ProjectReference Include="..\Service.GraphQLBuilder\Azure.DataApiBuilder.Service.GraphQLBuilder.csproj">
67+
<PrivateAssets Condition="'$(PrivatizeAssets)' == 'true'">all</PrivateAssets>
68+
</ProjectReference>
6069
</ItemGroup>
6170

6271
<ItemGroup>
@@ -66,4 +75,15 @@
6675
<None Include="..\..\nuget_core\NOTICE.txt" Pack="true" PackagePath="\" Condition="Exists('..\..\nuget_core\NOTICE.txt')" />
6776
</ItemGroup>
6877

78+
<Target Name="IncludeInternalDependenciesInPackage">
79+
<ItemGroup>
80+
<_InternalAssembly Include="$(OutputPath)Azure.DataApiBuilder.Auth.dll" />
81+
<_InternalAssembly Include="$(OutputPath)Azure.DataApiBuilder.Config.dll" />
82+
<_InternalAssembly Include="$(OutputPath)Azure.DataApiBuilder.Service.GraphQLBuilder.dll" />
83+
<_InternalAssembly Include="$(OutputPath)Azure.DataApiBuilder.Product.dll" />
84+
85+
<TfmSpecificPackageFile Include="@(_InternalAssembly)" PackagePath="lib/$(TargetFramework)" />
86+
</ItemGroup>
87+
</Target>
88+
6989
</Project>

0 commit comments

Comments
 (0)