Hasan
Hasan

Reputation: 247

How to pack all project files(not just dll) into single executable?

I have recently started learning C#. I have been working on a project to learn .Net core. When I build my project it generates one dll, some json and one pdb file along with the exe file. To run the exe file, those other files needs to be in the same directory. How can I pack all these files into the exe files?

Upvotes: 0

Views: 1726

Answers (1)

tmaj
tmaj

Reputation: 35155

You need to publish it with PublishSingleFile. Please see What's new in .NET Core 3.0

dotnet publish -r win10-x64 -p:PublishSingleFile=true

Upvotes: 1

Related Questions