So I'm trying to merge all of my DLL files into my exe if it's possible so I can run the exe without needing the DLL files in the same directory I tried looking around for other people asking the same question but didn't really find anything helpful or anything I could personally follow.
Thanks in advance for the help
From Single-file deployment you can edit your project file to contain the following
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
</Project>
Which corresponds to running the CLI tool:
dotnet publish -r win-x64 -p:PublishSingleFile=true --self-contained true
Before the single-file deployment was available (in .NET Framework), I personally used Fody Costura. Fody is an assembly weaver which, after installing, puts some commands into the MSBuild configuration of your project that enable you to do many things. One add-in is Costura, it weaves your dependencies into a single assembly.