Open stamminator opened 1 week ago
Hi @stamminator,
What issues are you having? Any specific error messages?
@sw3103 No error messages. All I'm doing is running a build in release configuration, which produces all the dependencies as standalone files alongside a small executable in the bin
directory, whereas yours is just one large executable.
Ah, now I understand what you're asking.
I have added a reference to this package which accomplishes this for me.
@stamminator any luck?
I see the Nuget reference to Fody, but I still don't know how to use it. It looks like the Costura add-in is where the packaging into a single exe happens, but since the FodyWeavers.xml file looks like this...
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura/>
</Weavers>
... it's not clear how that's being accomplished. Are there additional steps or configuration beyond running a Release build in Visual Studio 2022 that you're doing to make this work?
It really is as simple as that. Here is Move Mouse's FodyWeavers.xml:
https://github.com/sw3103/movemouse/blob/master/4x/Move%20Mouse/FodyWeavers.xml
Once you compile you should be able to test by copying the single exe into a new directory without any of the dependencies and validate it runs. Don't be confused by the fact that the Fody component doesn't clean-up the dependencies from the bin folder.
Your GitHub releases are packages as a standalone executable, which is great. I haven't been able to figure out how to do the same. Could you share how you accomplish that?