Skip to content

Commit

Permalink
Add SBOM generation to NuGet Package output using Microsoft.Sbom.Targets
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hawker committed Jan 29, 2025
1 parent a01bd8d commit cace1f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<GenerateSBOM>true</GenerateSBOM>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);Uno0001</NoWarn>
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Release'">
<PackageReference Include="Microsoft.Sbom.Targets" Version="3.0.1" PrivateAssets="all" />
<PackageReference Include="NuGet.Build.Tasks.Pack" Version="6.12.1" PrivateAssets="all" Pack="false" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>

<PropertyGroup>
Expand Down

0 comments on commit cace1f7

Please sign in to comment.