Browse Source

Use Microsoft.Sbom.Targets in Decompiler, BamlDecompiler and ILSpyX NuGets (#3346)

https://github.com/microsoft/sbom-tool/tree/main/src/Microsoft.Sbom.Targets to embed SBOM

* GeneratePackageOnBuild removed, build action now has a new step for dotnet pack
* Decompiler, BamlDecompiler and ILSpyX include SBOM
pull/3365/head
Christoph Wille 5 months ago committed by GitHub
parent
commit
1263f48dc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      .github/workflows/build-ilspy.yml
  2. 1
      Directory.Packages.props
  3. 10
      ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj
  4. 6
      ICSharpCode.BamlDecompiler/packages.lock.json
  5. 7
      ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
  6. 6
      ICSharpCode.Decompiler/packages.lock.json
  7. 7
      ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj
  8. 6
      ICSharpCode.ILSpyX/packages.lock.json

7
.github/workflows/build-ilspy.yml

@ -103,6 +103,13 @@ jobs: @@ -103,6 +103,13 @@ jobs:
if: matrix.configuration == 'release'
run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net8.0-windows\win-arm64\publish\fwdependent\*
- name: Pack NuGets
if: matrix.configuration == 'release'
run: |
dotnet pack ICSharpCode.Decompiler --no-restore
dotnet pack ICSharpCode.BamlDecompiler --no-restore
dotnet pack ICSharpCode.ILSpyX --no-restore
- name: Build Installer (x64 and arm64, framework-dependent)
if: matrix.configuration == 'release'
run: |

1
Directory.Packages.props

@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Microsoft.NETCore.ILAsm" Version="9.0.0" />
<PackageVersion Include="Microsoft.NETCore.ILDAsm" Version="9.0.0" />
<PackageVersion Include="Microsoft.Sbom.Targets" Version="3.0.1" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageVersion Include="Mono.Cecil" Version="0.11.6" />

10
ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj

@ -29,8 +29,8 @@ @@ -29,8 +29,8 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Copyright 2024-$([System.DateTime]::Now.Year) AlphaSierraPapa</Copyright>
<PackageTags>C# Decompiler ILSpy</PackageTags>
<GenerateSBOM>true</GenerateSBOM>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
@ -68,6 +68,13 @@ @@ -68,6 +68,13 @@
</GetPackageVersionDependsOn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Sbom.Targets">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj" />
</ItemGroup>
@ -75,6 +82,7 @@ @@ -75,6 +82,7 @@
<Target Name="ILSpyUpdateAssemblyInfo" AfterTargets="ResolveProjectReferences">
<ReadLinesFromFile ContinueOnError="true" File="..\VERSION">
<Output TaskParameter="Lines" PropertyName="PackageVersion" />
<Output TaskParameter="Lines" PropertyName="SbomGenerationPackageVersion" />
</ReadLinesFromFile>
</Target>

6
ICSharpCode.BamlDecompiler/packages.lock.json

@ -2,6 +2,12 @@ @@ -2,6 +2,12 @@
"version": 2,
"dependencies": {
"net8.0": {
"Microsoft.Sbom.Targets": {
"type": "Direct",
"requested": "[3.0.1, )",
"resolved": "3.0.1",
"contentHash": "/5cyDjX6sDJpgWvMUVwUK7XXa4PIzQWcbUCdsLpAUCqlXRymF0mIMzLVTcAmA55qmTS9cpnjh+28xZD4qKBxQA=="
},
"TomsToolbox.Composition.Analyzer": {
"type": "Direct",
"requested": "[2.21.0, )",

7
ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj

@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Copyright 2011-$([System.DateTime]::Now.Year) AlphaSierraPapa</Copyright>
<PackageTags>C# Decompiler ILSpy</PackageTags>
<GenerateSBOM>true</GenerateSBOM>
<NeutralLanguage>en-US</NeutralLanguage>
<GenerateAssemblyVersionAttribute>False</GenerateAssemblyVersionAttribute>
@ -34,7 +35,6 @@ @@ -34,7 +35,6 @@
<NoWarn>1701;1702;1591;1573</NoWarn>
<WarningsAsErrors>nullable</WarningsAsErrors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
@ -80,6 +80,10 @@ @@ -80,6 +80,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Sbom.Targets" Version="3.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="6.0.0" />
<PackageReference Include="System.Reflection.Metadata" Version="6.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
@ -726,6 +730,7 @@ @@ -726,6 +730,7 @@
<WriteLinesToFile Lines="$(CommitHash)" File="@(UpdateAssemblyInfoStamp)" Overwrite="true" Condition="'$(CommitHash)'!='$(LastCommitHash)'" />
<ReadLinesFromFile ContinueOnError="true" File="..\VERSION">
<Output TaskParameter="Lines" PropertyName="PackageVersion" />
<Output TaskParameter="Lines" PropertyName="SbomGenerationPackageVersion" />
</ReadLinesFromFile>
</Target>

6
ICSharpCode.Decompiler/packages.lock.json

@ -2,6 +2,12 @@ @@ -2,6 +2,12 @@
"version": 1,
"dependencies": {
".NETStandard,Version=v2.0": {
"Microsoft.Sbom.Targets": {
"type": "Direct",
"requested": "[3.0.1, )",
"resolved": "3.0.1",
"contentHash": "/5cyDjX6sDJpgWvMUVwUK7XXa4PIzQWcbUCdsLpAUCqlXRymF0mIMzLVTcAmA55qmTS9cpnjh+28xZD4qKBxQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",

7
ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj

@ -32,8 +32,8 @@ @@ -32,8 +32,8 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>Copyright 2022-$([System.DateTime]::Now.Year) AlphaSierraPapa</Copyright>
<PackageTags>C# Decompiler ILSpy</PackageTags>
<GenerateSBOM>true</GenerateSBOM>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
@ -97,6 +97,10 @@ @@ -97,6 +97,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Sbom.Targets">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
@ -106,6 +110,7 @@ @@ -106,6 +110,7 @@
<Target Name="ILSpyUpdateAssemblyInfo" AfterTargets="ResolveProjectReferences">
<ReadLinesFromFile ContinueOnError="true" File="..\VERSION">
<Output TaskParameter="Lines" PropertyName="PackageVersion" />
<Output TaskParameter="Lines" PropertyName="SbomGenerationPackageVersion" />
</ReadLinesFromFile>
</Target>

6
ICSharpCode.ILSpyX/packages.lock.json

@ -8,6 +8,12 @@ @@ -8,6 +8,12 @@
"resolved": "1.3.8",
"contentHash": "LhwlPa7c1zs1OV2XadMtAWdImjLIsqFJPoRcIWAadSRn0Ri1DepK65UbWLPmt4riLqx2d40xjXRk0ogpqNtK7g=="
},
"Microsoft.Sbom.Targets": {
"type": "Direct",
"requested": "[3.0.1, )",
"resolved": "3.0.1",
"contentHash": "/5cyDjX6sDJpgWvMUVwUK7XXa4PIzQWcbUCdsLpAUCqlXRymF0mIMzLVTcAmA55qmTS9cpnjh+28xZD4qKBxQA=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",

Loading…
Cancel
Save