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.

Is it possible to alter dotnet publish structure?

See original GitHub issue

I’m publishing self-contained netcoreapp2.0. The resulting structure is a huge mess, as it includes over 150 different dll libraries, and in addition to that over 70 folders for resx resources related to localization in my case. I’m wondering if it’s possible through any current means to alter this structure, by moving all localization folders such as de-DE to resources folder or similar, and all dll libraries to lib folder or likewise. This would lead to a single Application.exe binary, resources folder and lib folder, making entire thing look much better.

If it’s currently not possible, perhaps it’d be a worth addition to the SDK?

Thank you in advance for response.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:28
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
bugproofcommented, Jan 7, 2020

FYI dnSpy does this by patching AppHost exe: image

All the .dll files are inside bin and main .exe to launch it is outside. It looks very clean IMO.

https://github.com/0xd4d/dnSpy/blob/5c810b6243f9aab34436f631f85dd362dc486998/build.ps1#L58

https://github.com/0xd4d/dnSpy/tree/master/Build/AppHostPatcher

3reactions
Vercidiumcommented, Jul 18, 2021

Bumping this issue, I’d love to be able to move the large list of DLLs to a folder called lib/ and specify in my deps.json to look in there when searching for DLLs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to alter dotnet publish structure? · Issue #8888
I'm wondering if it's possible through any current means to alter this structure, by moving all localization folders such as de-DE to resources ......
Read more >
dotnet publish command - .NET CLI
The dotnet publish command accepts MSBuild options, such as -p for setting properties and -l to define a logger.
Read more >
NET application publishing overview
Applications you create with .NET can be published in two different modes, and the mode affects how a user runs your app.
Read more >
Publish .NET apps with the .NET CLI
This article demonstrates how you can publish your .NET application from the command line. .NET provides three ways to publish your ...
Read more >
Trim self-contained applications - .NET
In Solution Explorer, right-click on the project you want to publish and select Publish. Solution Explorer with a right-click menu highlighting ...
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