ilmerge

C# ILMerge Unable to cast object of type 'ClassY' to type 'ClassX'.

Here's the situation: I am using ILMerge to merge an assembly & all it's references into 1 .dll file using this method (custom.dll). I have an application which dynamically loads this assembly at runtime (program.exe). Both application & assembly use a common library (common.dll). Abstract class ClassX is defined in common.dll whilst...

ILMerge and localized resource assemblies

We have an application whose structure when compiled looks something like this: Foo nb-NO Text.resources.dll sv-SE Text.resources.dll Bar.dll Foo.exe Text.dll Is it possible to use ILMerge on this? How would you do that? ...

Add custom properties for references in Visual Studio 2005

I make use of this technique by Scott Hanselman for merging multiple assemblies as part of building my solution. It works well but it's a bit of a hassle having to hand-edit my .csproj/.vbproj files. Is it possible to add custom properties to the VS property grid for references? I'd like to be able to add a boolean property to indica...

.NET type definitions in merged assemblies (ILMerge)

I am merging several .NET assemblies using ILMerge including some 3rd party assemblies. Since doing so, I've experienced several errors that all boil down to the fact that type definitions are tied to the assembly they are defined in. A simple example is the log4net config section definition in my App.config. It uses type="log4net.Con...

In a VS Setup project, how can I exclude the dependencies of a project from the MSI?

I'm working in C#. I have a small VS Solution with 4 projects: a DLL an EXE that references the DLL a merge project, that does nothing more than ILMerge on the assemblies from the prior two steps a setup project, that packages the .EXE output of the Merge project. (I've added the "Primary Output of a Project" to the setup, specify...

ILMerge DLL not merged in correctly

In the build process for a .NET C# tool, I have been using ILMerge to merge the assemblies into a single exe. I added a new class library recently, and now the ILMerge is failing. I have remembered to tell it to merge in the new DLL! It is now giving me this error, which I don't really understand: ILMerge.Merge: The assembly 'Da...

Using ILMerge, is it possible to merge XML documentation files with the DLL ?

I know I can merge PDB with a DLL file but I'm trying to do the same with an XML documentation file. It should be possible since you don't have .xml files with .net assemblies and yet you have documentation in the IDE. Is there a way ? ...

Pre-generating XmlSerializers using Sgen and ILMerge. Trouble with arrays.

I use XmlSerializer extensively and rather than allowing .NET to generate the necessary serialization assemblies at runtime, I'd like to generate these assemblies ahead of time and bundle them with my application. I am able to use Sgen to generate these assemblies at build time. Additionally, I must run Sgen separately for each array typ...

ILMerged Classes Not Visible To Resharper

I have ILMerged some assemblies. For example: Foo.Bar Bar.Foo Foo.Baz Into one assembly. For example: FooBarBaz.Merged And it works. That is, when I reference FooBarBaz.Merged and use something like Foo.Bar.MyClass in code it compiles just fine. However Resharper (v5) does not work. Usages of any type from the merged assembl...

merged DLLs, Intellisense not picking up separate XML doc files

I use ILMerge to merge several of my C# project DLLs into a single DLL for the whole solution. I have each project produce a .XML file of its documentation for Intellisense, and I'm having trouble getting those comments to show up when I try to use my merged DLL as a reference in another solution. I have these files all in the same dir...

Is there a naming convention for the output of merged assemblies

We're using ILMerge to combine a (sub...i.e. not the startup project)project assembly and it's dependent assemblies into one assembly. The sub project is named like so...MainProjectNameSubProjectName so that when it compiles it creates an assembly named MainProjectNameSubProjectName.dll. Now we run ILMerge to combine all the assemblies...

ILMerge: How to configure the corresponding app.config

I'm just trying ILMerge to merge my application and the needed libraries into one executable. I'm using the command line just to do some testing. I took a sample project: ilmerge /out:ProgramMerged.exe Program.exe Lib1.dll Lib2.dll This seems to work as intended. But what if I had a Program.exe.config? Is it still applicable? Does a...

Can ILMerge and VSTO work together?

I am attempting to merge a few assemblies in a VSTO 2008 project using ILMerge using this target file in the primary assembly's build. The build succeeds, and as far as I can tell the assembly merge is also successful - no post build errors, it looks correct in Reflector, etc. However, the addin will no longer load (in Outlook) in the ...

Allow duplicate generic types in ILMerge

Hi, according to the ILMerge documentation it allows to merge assemblies with conflicting types. I'm trying to merge FSharp.Core.dll and System.Reactive.dll but I can't figure out the command line params for this. ILMerge is complaining about the conflicting versions of System.IObservable<T>. How can I tell it to solve this conflict. ...

ILMerge problem: start with command prompt only

Hi, I build 5 DLLS and my exe in C#.Net 2.0 with ILMerge to one exe file. The problem is that now every time I start the output exe, an empty command prompt opened with the exe. Anyone knows the problem and know how to solve it? ...

How can I tell that ILMerge has been used

I'd like to be able to tell whether or not an assembly is the output/result from using ILMerge on two different assemblies. It doesn't matter how nitty gritty it is, if I have to parse IL, I'm willing to do it. Is there anything that would be indicate that the assembly author used ILMerge? ...

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

I want to merge one .NET DLL assembly and one C# Class Library project referenced by a VB.NET Console Application project into one command-line console executable. I can do this with ILMerge from the command-line, but I want to integrate this merging of reference assemblies and projects into the Visual Studio project. From my reading, ...

How can I set the path environnment variable in Visual Studio?

I'm using ILMerge in my post build step. For interoperability reason I would like use ILMerge relative path. How can I set the path environment variable accessible from my post build step? ...

Performance of .NET ILMerged assemblies

I have two .NET libraries: "Foo.Bar" and "Foo.Baz". "Foo.Bar" is self-contained, while "Foo.Baz" references "Foo.Bar". Assuming I do the following: Use ILMerge to merge "Foo.Bar.dll" with "Foo.Baz.dll" into "Foo1.dll". Create a new solution containing the entirity of both "Foo.Bar" and "Foo.Baz" (since I have access to their source co...

Strong name validation failed on VB.NET Assembly

I have a VB.Net 1.1 application works just fine after compiling in Visual Studio. However, I want to use ILMerge to combine all the referenced assemblies into a single executable just to make it easier to move around. After I send it through ILMerge and try to run it I get the error "Strong name validation failed for assembly.exe" .....