Unfortunately, I am unsure if this is a feature request, bug report, or my failure to properly read the documentation, but I am unable to make a trimmed single executable with debugging symbols. I have a simple code example here : https://github.com/dmorrison42/CrashTestDummy
The following line will create a single executable that will print a line number of an exception, but is fairly large (~67M).
dotnet publish -c release -r win10-x64 -p:PublishSingleFile=true -p:IncludeSymbolsInSingleFile=true -o .
The following line with create a single executable that will print no line number, but is relatively small (~25M).
dotnet publish -c release -r win10-x64 -p:PublishSingleFile=true -p:IncludeSymbolsInSingleFile=true -p:PublishTrimmed=true -o .
Update: As of dotnet core 3.1.100. The workaround provided by @sbomer works.
Just add the following to the csproj:
<ItemGroup>
<TrimmerRootAssembly Include="System.Diagnostics.StackTrace" />
</ItemGroup>
<PropertyGroup>
<_ExtraTrimmerArgs>--keep-facades true</_ExtraTrimmerArgs>
</PropertyGroup>
The sample project has been updated appropriately.
Unfortunately, I am unsure if this is a feature request, bug report, or my failure to properly read the documentation, but I am unable to make a trimmed single executable with debugging symbols. I have a simple code example here : https://github.com/dmorrison42/CrashTestDummy
The following line will create a single executable that will print a line number of an exception, but is fairly large (~67M).
dotnet publish -c release -r win10-x64 -p:PublishSingleFile=true -p:IncludeSymbolsInSingleFile=true -o .The following line with create a single executable that will print no line number, but is relatively small (~25M).
dotnet publish -c release -r win10-x64 -p:PublishSingleFile=true -p:IncludeSymbolsInSingleFile=true -p:PublishTrimmed=true -o .Update: As of dotnet core 3.1.100. The workaround provided by @sbomer works.
Just add the following to the csproj:
The sample project has been updated appropriately.