Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Microsoft.Sbom.Targets in ICSharpCode.Decompiler NuGet #3346

Merged
merged 10 commits into from
Jan 10, 2025
Merged
7 changes: 7 additions & 0 deletions .github/workflows/build-ilspy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
10 changes: 9 additions & 1 deletion ICSharpCode.BamlDecompiler/ICSharpCode.BamlDecompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -67,6 +67,13 @@
$(GetPackageVersionDependsOn)
</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" />
Expand All @@ -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>

Expand Down
6 changes: 6 additions & 0 deletions ICSharpCode.BamlDecompiler/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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, )",
Expand Down
7 changes: 6 additions & 1 deletion ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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>

Expand Down
6 changes: 6 additions & 0 deletions ICSharpCode.Decompiler/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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, )",
Expand Down
7 changes: 6 additions & 1 deletion ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand All @@ -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>

Expand Down
6 changes: 6 additions & 0 deletions ICSharpCode.ILSpyX/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -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, )",
Expand Down
Loading