ilmerge

Referencing assemblies created with ILMerge in Visual Studio projects

I have a solution in Visual Studio with 5 projects. They are: Foo.Core: Core functionality Foo.Api: Generated code built on top of core Foo.Web: Web-specific extensions Foo.Web.Mvc: MVC-specific extensions Newtonsoft.Json: 3rd party library I want to use ILMerge to merge Foo.Core, Foo.Api and Newtonsoft.Json into a single assembly, c...

Runtime Version of ILMerge'd assembly is v4.0.20926; expected version is v4.0.30319

This is what my .csproj AfterBuild looks like: <Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'"> <Exec Command="&quot;..\Tools\ILMerge\ILMerge.exe&quot; /internalize /ndebug /out:@(MainAssembly) /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 &quot;@(IntermediateAssembly)&quot; @(ReferenceCop...

using ILMerge with .NET 4 libraries

Two problems: 1) Basic .NET Assembly Not Included in ILMerged Assembly I'm having trouble using ILMerge in my post-build after upgrading from .NET 3.5/Visual Studio 2008 to .NET 4/Visual Studio 2010. I have a Solution with several projects whose target framework is set to ".NET Framework 4". I use the following ILMerge command to mer...

build single file application

Hello. I am trying to merge two files. One of them is .net3.5 wpf application and other is WPF notify icon dll i use the following command: IlMerge /target:winexe /out:PS.exe "PlayerSearcher.exe" "Hardcodet.Wpf.TaskbarNotification.dll" But when i launch result assebmly my application is crashed with this error EventType : clr20r3...

Is ILMerge broken when merging assemblies containing Lambdas in VS2010?

I've been trying to use ILMerge to merge assemblies in VS2010 and the resulting primary assembly ends up being unusable. This only seems to occur when the assemblies being merged contain methods with Lambda expressions. Also, it seems to work fine in VS2008. I've outlined my investigation in more detail at http://tinyurl.com/38mz4ef ...

How do I debug into an ILMerged assembly?

Summary I want to alter the build process of a 2-assembly solution, such that a call to ILMerge is invoked, and the build results in a single assembly. Further I would like to be able to debug into the resultant assembly. Preparation - A simple example New Solution - ClassLibrary1 Create a static function 'GetMessage' in Class1 whic...

ILMerge and Project References

I have a VS solution (.sln) that has the following structure. Project A Project B (contains reference to Project A as well as references to 3rd party assemblies like NHibernate, StructureMap, etc) I want to use ILMerge to roll the 3rd party assemblies into the ProjectB.dll. However, I don't want to merge ProjectA. I've used the pr...

Build With ILMerge Error

Has anyone had this error with IlMerge? I am trying to merge a few assemblies for a .NET project using the 4.0 Framework. ILMerge /log /lib:..\Libraries /targetplatform:v4 /internalize:..\SolutionFiles\CJCommon.exclude /ndebug /out:bin\Release\Common.dll obj\Release\Common.dll C:\Development\CJCommon\Libraries\FluentNHibernate.dll C:\D...

ILMerge and Castle.Core Exclusion

Does anyone know why the Castle.Core assembly has to be excluded from the IlMerge process? I've seen a lot of open source projects with IlMerge.exclude files that lists the following files to be excluded from the merge. Castle.Core.Interceptor.IInvocation Castle.Core.Interceptor.IInterceptor Castle.Core.Interceptor.IProxyTargetAccessor...

Drawbacks, advantages, etc. between ILMerge or ResolveAssembly for embedding assemblies?

Currently I know of two methods of embedding assemblies into one application file: ILMerge and using the ResolveAssembly event. I would like to know if anyone have had more success with one over the other. Is there any drawbacks from using either one of those (performance, security, ...)? From my point of view, it looks like we should...

merge DLLs n .cs files

Hi, A part of big project is a payment system, that I would like to reuse. I want to merge all the class files of this payment system into DLLs so that add them as a reference in all the other projects. The present payment system is also using namespaces from the DLLs of a commercial application (nsoftware-paypal n few others). I tried ...

Is there a free program that merges assemblies (like ILMerge), but works with wpf?

I have not had any luck merging wpf assemblies using ILMerge. ...

BadImageFormatException with .NET ILMerged DLL in Windows 7 64

I'm developing in Windows 7 64-bit with Visual Studio 2008. I have a collection of class libraries that I merge into a single DLL using ILMerge. When I try to use this merged DLL, however, I get [BadImageFormatException: Could not load file or assembly 'MyMergedDll' or one of its dependencies. An attempt was made to load a program ...

Serious trouble with ILMerge and .NET 4.0

For the life of me, I can't seem to get my .NET 4 application merging properly with ILMerge. Even after setting /targetplatform, /lib, /ndebug and adding a custom ILMerge.exe.config file the output file doesn't work properly (it doesn't seem to be able to "find" the merged libraries). I've tried this and this to no avail. I can't even g...

Unable to Instantiate the class through .NET Reflection; merged with ILMerge

I have merged 10 assemblies in to a single assembly using ILMerge. And tried to instantiate using below code: //Assembly asm = Assembly.LoadFrom(@"D:\merg\Final\Merged\Actual.dll"); Assembly asm = Assembly.LoadFrom(@"D:\merg\Final\Merged\Final.dll"); object[] param = new object[1] { null }; Type t = asm.GetTypes...

assembly reference problem--'assembly not referenced' versus type in two assemblies

I'm having a problem with assembly references. I have four assemblies: A class library called EncryptionUtils Another class library called PasswordUtils that uses EncryptionUtils Another class library called Toolkit that is an ILMerge of many libraries, including EncryptionUtils A WPF application that uses Toolkit and PasswordUtils ...

Why does ILMerge do nothing when publishing?

ILMerge usually merges my assemblies fine when building a Release, but when Publishing for ClickOnce the resulting EXE doesn't contain the DLLs that were supposed to be merged. I think ILMerge is working, but Publish is overwriting the new merged assembly with the old original one. I made a Post-Build event that stopped the build right ...

How to merge assemblies of a WPF application?

I tried to use ILMerge on my WPF-based project (VS2010, Net4.0) but I couldn't make the merged executable to run. So I created two very simply projects just a console application which prints out hello world wpf application which shows window with hello world label After compiling each project I get single executable file (so merging...

How to merge all dlls into one for an application?

My case: I have an app.exe and several dlls for it -- a.dll, b.dll, c.dll, etc (they come from single VS solution which consists of many projects). I would like to merge (ilmerge) all dlls into one so I would have: app.exe + x.dll. Now, there is a problem -- the application expects to have all dlls so when I put just single file x.dll i...

Merging Assemblies

I m working on a project which contain about 17 projects in it, means 17 DLL's. i want to merge some assemblies together. after googling i found ILMerge . is Ilmerge good ? n how to use it? can anyone tell me ? i tried it but so many errors came when i try to run the .exe. Anyone ? ...