C# – ilmerge error “Unresolved assembly reference not allowed: xxxxxxx”

cilmerge

I am trying to merge two assemblies using ilmerge with the method described here:

http://www.hanselman.com/blog/MixingLanguagesInASingleAssemblyInVisualStudioSeamlesslyWithILMergeAndMSBuild.aspx

however, I am getting an error with a project reference I don't want merged…so, of three referenced assemblies, I just want one merged, but the ilmerge doesn't seem to work with the project references.

I know there is a /lib: option, but how can I automate that in the Ilmerge.CSharp.targets so it works with any project?

Best Answer

What error message do you get?

After applying Scott Hanselman's changes to Ilmerge.CSharp.targets, manually set <IlMerge>True</IlMerge> in your csproj file only on those project references you want merged.