question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publish Single-file: Smart settings for IncludeSymbolsInSingleFile

See original GitHub issue

When publishing an app as a single file, the default setting is to not include PDB files in the output bundle by default (and instead leave them as separate files).

However, this setting is unsuitable for some apps, where the deps.json file includes a dependency on the PDB file. This causes runtime-crash of the app when the apphost validates the contents against the deps.json manifest. For example: https://github.com/PowerShell/PowerShell/issues/10266 https://github.com/Viir/bots/tree/adapt-for-single-file-exe-publish

The inclusion of PDB files as a dependency is almost always an error, but an app (and its dependencies/nuget packages) are not required to associate the same semantics with file-extensions.

So, if the deps.json writer finds a PDB file in the manifest, the SDK should default the IncludeSymbolsInSingleFile setting to true. The SDK should also issue a warning about this change, so that PDBs are not silently included – unintentionally increasing the size of published apps.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:8
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
nguerreracommented, Sep 27, 2019

Great points. At the end of the day, we have to uniformly decide if something is a symbol file or not. If we decide it is not a symbol file, but an arbitrary native asset, then it should be in deps.json AND deployed irrespective of IncludeSymbolsInSingleFile. And if we decide it is a symbol file, then it should not be in deps.json AND included in single file if and only if IncludeSymbolsInSingleFile is true.

NuGet and the assets files should be the source of truth for what files in package are what kind of thing. If we decide to use extension heuristics for this, then they should go in nuget. SDK should respect what NuGet tells us.

I will combine this issue and the issue of not copying managed PDBs into one feature request for nuget.

1reaction
dasMullicommented, Sep 27, 2019

To double down: Does IncludeSymbolsInSingleFile also apply to dsym files? I think there should be parity for each runtime if that is the case, so leaving native pdb / dsym / * files alone and not applying filters to that or encoding the knowledge about all kinds of symbol files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a single file for application deployment - .NET
Publish a single file application using the dotnet publish command. ... being embedded in the single file by setting the following metadata:.
Read more >
Including symbols in a single file bundle is not supported ...
I try to publish a .net Core (WinForms) project, which I upgraded from core3.0 to net5.0, as Single Exe. I get the following...
Read more >
How To Publish a Single File .NET Application - YouTube
Comments52 · Publishing /Deploying WPF Applications (feat. · Publishing - WPF MVVM TUTORIAL #10 · How to Create Setup .exe in Visual Studio...
Read more >
NET 6 WinForms PublishSingleFile w/merging support?
I don't believe Smart Assembly's support of single file executables has changed since .NET Core 3, however I think what you're describing was ......
Read more >
Publish single executable not working for .NET 5 or .NET 6
Solved: Publishing a WPF application as a single executable does not work for .NET 5 (using ArcGIS Runtime 100.12) or .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found