I try to embed the dll of a class library into my exe. I use visual studio 2019 and .net 5. I created two projects in one solution one is class library (dll), and the second is console application both targeted for .net core 5. I selected the console application as startup project. the class library contain only public static hello function which print out hello. I referenced the project of the class library into the console application then in the console application i only called the ClassNamespace.library.hello function. when I compile it, it workes fine. then I installed costura.fody as described in their readme, i added the to the console project by:
PM> Install-Package Fody
PM> Install-Package Costura.Fody
Then I FodyWeavers.xml into project folder
<Weavers>
<Costura/>
</Weavers>
After that i rebuilt the project, and it built, and the exe is running, but when I delete the .dll from the output directory the .exe isn't running.