We have a WPF application that we are trying to publish as a single file.
I am running the command:
dotnet publish .\{path_to_projectA_csproj_file}.csproj -c Release --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly
It generates the following files:

Problem is, when trying to run it in test environment, it does not find a third party .dll. Error from event log:
The third party .dll is referenced in ProjectB that is referenced by ProjectA that I am trying to publish.
Third party .dll reference in ProjectB .csproj:
I tried:
- using the "-p:IncludeAllContentForSelfExtract=true" publish parameter - did not help
- setting build action to Content - did not help
- settings .csproj parameters CopyToOutputDirectory and CopyToPublishDirectory to PreserveNewest - did not help
tl;dr how to include third party libraries into .exe file when publishing a dotnet application as single file?

