Is there a way for me to insert a resource into the manifest of another assembly?
I’ve been experimenting with MSBuild and ILMerge but apparently a resouce assembly created by the Assembly Linker can not be merged wtih ILMerge, looks like ILMerge cant do a resource only merge.
al /out:Resources.dll /embed:Test.txt,Resources.Test
ilmerge just yields an error
ILMerge.Merge: Could not load assembly from the location 'Resources.dll'
Okay, I actually had the answer, my ILMerge version must have been buggy…
I took the C# class template .cs file and compiled that in the simplest way
I then use the Assembly Linker part of the Windows SDK to create a trivial resource assembly (quicker)
This last part failed with a stupid null reference exception, last time I tried this. But just now it worked like a charm.
You can verify the result using
ildasm…and that’s it!
I use this to inject stuff into assemblies post-build as part of the build process. e.g. SVN log information. So that I can track a binary to a specific revision and person.