To start with: I'm a complete beginner. I have two projects in one solution. One project is a console application, which is called from the windows form application. Now I want to add these to one executable. I was told that it was possible with Fody/Costura. I downloaded it and added the IncludeAssemblies code to the xml file. However, if i go to the debug folder, ther are still the two executables seperately (apart from some new generated files) Does the executable save in another place or did i do something wrong?
Problems with Fody/Costura
Asked Answered
As of version 1.5 Costura automatically cleans up the directory.
To disable this there is now a setting in the config. https://github.com/Fody/Costura#disablecleanup
It could be that Fody/Costura has already merged the separate DLL files (.NET assemblies) into the EXE. It doesn't take care of deleting those for you. You can easily check if this is the case by simply copying the executable out of the output directory along with any other dependencies besides the assemblies, and see if it runs.
Also, of course, you can use an assembly inspector like Reflector to see in the Copy Local referenced assemblies have been embedded as resources into your final exe/dll. –
Bazooka
<Target
AfterTargets="AfterBuild;NonWinFodyTarget"
Name="CleanReferenceCopyLocalPaths" >
<Delete Files="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')" />
</Target>
in the project file also should work to clean up the duplicates
© 2022 - 2024 — McMap. All rights reserved.