ILMerge hangs on merge

Looks like just writing out the question helped. Turns out I needed to add /targetplatform:v4 to the command. My guess is it’s because some of the assemblies use .NET 4 and some use .NET 2.

ILMerge DLL: Assembly not merged in correctly, still listed as an external reference

I had to use the /closed argument. According to the official docs: Closed When this is set before calling Merge, then the “transitive closure” of the input assemblies is computed and added to the list of input assemblies. An assembly is considered part of the transitive closure if it is referenced, either directly or indirectly, … Read more

using ILMerge with .NET 4 libraries

There was a very recent release to solve x64 problems. Get in touch with Mike Barnett directly if you still have problems (mbarnett at microsoft dot com) Addendum. There’s something very, very wrong about your /lib:”C:\Windows\Microsoft.NET\Framework64\v4.0.30319″ option. This has been getting lots of programmers in trouble lately, after .NET 4.5 was released. That directory is … Read more

Merging dlls into a single .exe with wpf

http://www.digitallycreated.net/Blog/61/combining-multiple-assemblies-into-a-single-exe-for-a-wpf-application This worked like a charm for me 🙂 and its completely free. Adding code in case the blog ever disappears. 1) Add this to your .csproj file: <Target Name=”AfterResolveReferences”> <ItemGroup> <EmbeddedResource Include=”@(ReferenceCopyLocalPaths)” Condition=”‘%(ReferenceCopyLocalPaths.Extension)’ == ‘.dll'”> <LogicalName>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</LogicalName> </EmbeddedResource> </ItemGroup> </Target> 2) Make your Main Program.cs look like this: [STAThreadAttribute] public static void Main() { AppDomain.CurrentDomain.AssemblyResolve … Read more

ILMerge Best Practices

I use ILMerge for almost all of my different applications. I have it integrated right into the release build process so what I end up with is one exe per application with no extra dll’s. You can’t ILMerge any C++ assemblies that have native code. You also can’t ILMerge any assemblies that contain XAML for … Read more

Merge DLL into EXE?

For .NET Framework 4.5 ILMerge.exe /target:winexe /targetplatform:”v4,C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0″ /out:finish.exe insert1.exe insert2.dll ILMerge Open CMD and cd to your directory. Let’s say: cd C:\test Insert the above code. /out:finish.exe replace finish.exe with any filename you want. Behind the /out:finish.exe you have to give the files you want to be combined.

How to Integrate ILMerge into Visual Studio Build Process to Merge Assemblies?

The “MSBuild ILMerge task” (or MSBuild.ILMerge.Task) NuGet package makes this process quite simple. It defaults to merging any “copy local” references into your main assembly. Note: Although the packages have similar names, this one is different from ILMerge.MSBuild.Tasks that Davide Icardi mentioned in his answer. The one I’m suggesting here was first published in August … Read more

Visual Studio Rebuilds unmodified projects

Open Tools – Options, select Projects and Solutions – Build and Run in tree, then set “MSBuild project build output verbosity” to Diagnostic. This will output the reason for building a project, i.e. Project ‘ReferencedProject’ is not up to date. Project item ‘c:\some.xml’ has ‘Copy to Output Directory’ attribute set to ‘Copy always’. or Project … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)