I have a solution in Visual Studio with 5 projects. It:
Foo.Core: basic functionalityFoo.Api: Generated code built on top of the kernelFoo.Web: website extensionsFoo.Web.Mvc: MVC dependent extensionsNewtonsoft.Json: third-party library
I want to use ILMerge to merge Foo.Core, Foo.Apiand Newtonsoft.Jsoninto one assembly called Foo. This is the easy part.
The problem that I encounter is that Foo.Web, and Foo.Web.Mvcboth should refer to all three combined assembly.
If I reference the source assemblies, they will have invalid references after ILMerge is executed.
If I reference the assembly with ILMerged, I must reference the debug assembly and then modify it before packing everything that doesn't seem ideal.
I tried to create a project called Foothat references 3 merged assemblies and replaces its own result with ILmerged assembly, but this does not seem to work at all.
Is there a reliable way to do this?
source
share