Skip to content

Commit

Permalink
This should fix the trimmed build
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Nov 19, 2022
1 parent 38eb383 commit e3cd8a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/githubactionsbuilds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: dotnet publish .\DeveImageOptimizerWPF\DeveImageOptimizerWPF.csproj -r win-x64 -c Release /p:PublishSingleFile=true /p:SelfContained=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=true /p:Version=1.0.${{needs.generate_version_number.outputs.build_number}}
run: dotnet publish .\DeveImageOptimizerWPF\DeveImageOptimizerWPF.csproj -r win-x64 -c Release /p:PublishSingleFile=true /p:SelfContained=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=true /p:TrimMode=partial /p:Version=1.0.${{needs.generate_version_number.outputs.build_number}}
- name: Publish (Without Trim)
run: dotnet publish .\DeveImageOptimizerWPF\DeveImageOptimizerWPF.csproj -r win-x64 -c Release -o "DeveImageOptimizerWPF\bin\Release\net7.0-windows\win-x64\publishuntrimmed\" /p:PublishSingleFile=true /p:SelfContained=true /p:IncludeNativeLibrariesForSelfExtract=true /p:Version=1.0.${{needs.generate_version_number.outputs.build_number}}
- name: Publish
Expand Down
6 changes: 6 additions & 0 deletions DeveImageOptimizerWPF/DeveImageOptimizerWPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ILLink.Descriptors.xml">
<LogicalName>ILLink.Descriptors.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<TrimmerRootAssembly Include="System.Private.CoreLib" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions DeveImageOptimizerWPF/ILLink.Descriptors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<linker>
<!--<assembly fullname="DeveImageOptimizerWPF" preserve="all" />
<assembly fullname="PresentationFramework" preserve="all" />
<assembly fullname="System.Configuration.ConfigurationManager" preserve="all" />-->
</linker>

0 comments on commit e3cd8a9

Please sign in to comment.