From 1263f48dc037e1b44cbeb6b7e2d12308165bb179 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 10 Jan 2025 20:44:36 +0100 Subject: [PATCH] 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 --- .github/workflows/build-ilspy.yml | 7 +++++++ Directory.Packages.props | 1 + .../ICSharpCode.BamlDecompiler.csproj | 10 +++++++++- ICSharpCode.BamlDecompiler/packages.lock.json | 6 ++++++ ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj | 7 ++++++- ICSharpCode.Decompiler/packages.lock.json | 6 ++++++ ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj | 7 ++++++- ICSharpCode.ILSpyX/packages.lock.json | 6 ++++++ 8 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index d596d8fcb..71b7e0e1b 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -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: | diff --git a/Directory.Packages.props b/Directory.Packages.props index 5c5711fea..e18994c25 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -28,6 +28,7 @@ + diff --git a/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj b/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj index d054a6512..5bee31b6c 100644 --- a/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj +++ b/ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj @@ -29,8 +29,8 @@ false Copyright 2024-$([System.DateTime]::Now.Year) AlphaSierraPapa C# Decompiler ILSpy + true - true embedded true true @@ -67,6 +67,13 @@ $(GetPackageVersionDependsOn) + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + @@ -75,6 +82,7 @@ + diff --git a/ICSharpCode.BamlDecompiler/packages.lock.json b/ICSharpCode.BamlDecompiler/packages.lock.json index 2fe6f64a0..758895528 100644 --- a/ICSharpCode.BamlDecompiler/packages.lock.json +++ b/ICSharpCode.BamlDecompiler/packages.lock.json @@ -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, )", diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 5314bd4f7..af50e7947 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -20,6 +20,7 @@ false Copyright 2011-$([System.DateTime]::Now.Year) AlphaSierraPapa C# Decompiler ILSpy + true en-US False @@ -34,7 +35,6 @@ 1701;1702;1591;1573 nullable - true embedded true true @@ -80,6 +80,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -726,6 +730,7 @@ + diff --git a/ICSharpCode.Decompiler/packages.lock.json b/ICSharpCode.Decompiler/packages.lock.json index c6e34ae99..1bc3a0e2f 100644 --- a/ICSharpCode.Decompiler/packages.lock.json +++ b/ICSharpCode.Decompiler/packages.lock.json @@ -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, )", diff --git a/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj b/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj index 4272c40aa..3bcd8c8e1 100644 --- a/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj +++ b/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj @@ -32,8 +32,8 @@ false Copyright 2022-$([System.DateTime]::Now.Year) AlphaSierraPapa C# Decompiler ILSpy + true - true embedded true true @@ -97,6 +97,10 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -106,6 +110,7 @@ + diff --git a/ICSharpCode.ILSpyX/packages.lock.json b/ICSharpCode.ILSpyX/packages.lock.json index 37a460ef0..15b6aec8e 100644 --- a/ICSharpCode.ILSpyX/packages.lock.json +++ b/ICSharpCode.ILSpyX/packages.lock.json @@ -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, )",