'C# Compiling my code only works for my PC and no one elses

My code is built in NET Framework 4.7.2, it uses two .dlls siticone.dll + windowsinput.dll.

How do I let my code be used by others and include these .dlls. I am highly certain this is caused by those .dlls, as when I make a new WinForms app my friends can open that code but not my main one that has these .dlls!

P.S: on opening the code it sits in Task manager but does not physically open



Solution 1:[1]

What worked for me: Costura Fody, a NuGet that includes .dlls to your execute for you.

You can also use "Embed Interop Files" but after some digging and testing myself I found it didn't work on certain versions and lots of people saying to turn it off.

Another error I had with Costura.Fody which I figured out was you may need to remove the .dlls from your references and add them back in afterwards.

PS. You can also use an installer (like inno setup) if you like but I find it much simpler having it all inside of the execute. Hope this helps like everyone has helped me :)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1