Skip to content

Commit

Permalink
ensure dependencies get packed
Browse files Browse the repository at this point in the history
  • Loading branch information
saucecontrol committed Nov 9, 2023
1 parent 83b8dd8 commit 9bf5f9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ steps:
version: 6.0.x
performMultiLevelLookup: true

- script: dotnet build src/InheritDoc -c Dist --version-suffix ci$(Build.BuildNumber)
- script: dotnet build src/InheritDoc -c Dist -p:GeneratePackageOnBuild=false
displayName: Build

- script: dotnet build src/InheritDoc -c Dist --version-suffix ci$(Build.BuildNumber)
displayName: Pack

- script: dotnet test tests/InheritDoc.Test -c Coverage
displayName: Test

Expand Down
7 changes: 5 additions & 2 deletions src/InheritDoc/InheritDoc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<BuildOutputTargetFolder>tools</BuildOutputTargetFolder>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<NoWarn>$(NoWarn);NU5128</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,12 +20,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.9.20" PrivateAssets="all" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.9.20" />
<PackageReference Include="Mono.Cecil" Version="0.11.5" PrivateAssets="all" />
<PackageReference Condition="$(DefineConstants.Contains('NETFRAMEWORK'))" Include="System.ValueTuple" Version="4.5.0" />
<!-- these are for use in the test project, downloaded here to avoid version conflicts when building tests -->
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[7.0.0]" />
<PackageDownload Include="Microsoft.NETFramework.ReferenceAssemblies.net48" Version="[1.0.0]" />
</ItemGroup>

<Target Name="VerifyPackDependencies" BeforeTargets="GenerateNuspec">
<Error Condition="@(None->WithMetadataValue('Pack', 'true')->WithMetadataValue('Filename', 'Mono.Cecil')->Count()) != 2" Text="Dependencies were not present for pack. Start build again." />
</Target>

</Project>
2 changes: 1 addition & 1 deletion src/InheritDoc/package/build/SauceControl.InheritDoc.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>

<PropertyGroup>
<_InheritDocTaskTfm Condition="'$(MSBuildRuntimeType)'!='Core'">net46</_InheritDocTaskTfm>
<_InheritDocTaskTfm Condition="'$(MSBuildRuntimeType)'!='Core'">net462</_InheritDocTaskTfm>
<_InheritDocTaskTfm Condition="'$(MSBuildRuntimeType)'=='Core'">netstandard2.0</_InheritDocTaskTfm>
<_InheritDocTaskLib>$(MSBuildThisFileDirectory)..\tools\$(_InheritDocTaskTfm)\SauceControl.InheritDoc.dll</_InheritDocTaskLib>
<_InheritDocNetStandardFallback>$(MSBuildThisFileDirectory)..\tools\netstandard.xml.gz</_InheritDocNetStandardFallback>
Expand Down

0 comments on commit 9bf5f9c

Please sign in to comment.