Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile C# console without dll needed

Tags:

c#

console

dll

exe

When I compile my C# Console it comes with an dll, if I remove the dll the application doesn't work, and I need it to work with only an .exe and no .dll files. https://prnt.sc/t1gu4m

like image 997
Daniel TG Avatar asked Sep 15 '26 04:09

Daniel TG


1 Answers

  1. Right Click your Project
  2. Select Publish
  3. Deployment Mode: Self-Contained
  4. Check the Produce single file option

Et voila, you got a single exe with the required dependencies

like image 135
Maurice Legoland Avatar answered Sep 16 '26 19:09

Maurice Legoland



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!