ilmerge

Merging Assemblies

白昼怎懂夜的黑 提交于 2019-12-13 20:05:18
问题 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 ? 回答1: You run ILMerge by first passing the "primary" assembly, and then all of the other assemblies. Use the /out option to specify the output assembly, and use the /targetplatform option to specify the .NET target

ILMerge & Keep Assembly Name

自闭症网瘾萝莉.ら 提交于 2019-12-13 16:29:14
问题 I need to merge some dlls and both the file name and assembly name need to be the same as for my main dll (mydll.dll). I also need the pdb file. How do I get this done? Here are a few things I tried: Just use ILMerge mydll.dll .... /out:mydll.dll This fails with "Access to the path ...mydll.pdb is denied." Rename mydll.dll to mydllTemp.dll and mydll.pdb to mydllTemp.pdb and then ILMerge mydelltemp.dll .... /out:mydll.dll This fails with "The pdb associated with ...mydlltemp.dll is out of date

How to diagnose “System.TypeLoadException” error

只愿长相守 提交于 2019-12-13 06:26:18
问题 When I attempt to open my Windows Forms application (I'll call it MyApplication.exe ) on a machine other than my dev machine, a dialog window pops up saying: MyApplication has stopped working Windows can check online for a solution to the problem Check online for a solution and close the program Close the program Details Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: myapplication Problem Signature 02: 1.2.0.0 Problem Signature 03: 51c34395 Problem Signature 04: mscorlib

.NET merge class library references

偶尔善良 提交于 2019-12-12 18:30:18
问题 I have a class library which contains WPF user control. This library has some dependencies but I want to deploy it as one assembly. As I know IlMerge has some problems with WPF. I tried Costura but it works only for applications, not for class libraries (as I have found out here). Is there any way to achieve my goal? 回答1: As one of the contributors to Costura I can now confirm that it works for libraries as well as applications. In fact all the unit tests for Costura are on a library, so it

Need ILMerge hint

自古美人都是妖i 提交于 2019-12-12 16:29:07
问题 I'm trying to merge vintasoft barcode sdk with my data access dll and it's not working after ilmerge. Any ideas are welcome here is the error: IndexOutOfRangeException: Index was outside the bounds of the array.] 2.┌.©(Byte[] param0) in :0 2.┌..cctor() in :0 [TypeInitializationException: The type initializer for '2.┌' threw an exception.] 2.┌.¥Σ() in :0 Vintasoft.Barcode.WriterSettings..cctor() in :0 [TypeInitializationException: The type initializer for 'Vintasoft.Barcode.WriterSettings'

ILMerge: Rename internalized assemblies' namespaces?

断了今生、忘了曾经 提交于 2019-12-12 15:24:23
问题 For example, let's say I want to use Bouncy Castle in my DLL. Since I want to ease deployment, I use ILMerge to combine MyDll.dll and BouncyCastle.Crypto.dll to produce MyDllMerged.dll . I use the /internalize flag in ILMerge so that clients do not use my Bouncy Castle. If my consumer EndUser.exe also uses Bouncy Castle, he'll see that " Org.BouncyCastle...TypeFoo is already defined in MyDllMerged.dll ". Therefore, he is doomed and cannot use his that library himself. Is there anyway to tell

ILMerge for Silverlight 4

≯℡__Kan透↙ 提交于 2019-12-11 13:26:38
问题 I'm trying to get ILMerge working with a SL 4 class library (no xaml). I have a post build task: <Target Name="AfterBuild"> <CreateItem Condition="'%(Extension)'=='.dll'" Include="@(ReferenceCopyLocalPaths)"> <Output TaskParameter="Include" ItemName="IlmergeAssemblies" /> </CreateItem> <Exec Command=""$..\..\..\References\Ilmerge.exe" /ndebug /targetplatform:v4,"C:\Program Files (x86)\Microsoft Silverlight\4.0.50917.0" /internalize:"$..\..\ILMergeInclude.txt" /keyfile:"$..\..\..\References

Error 2 The type <T> exists in both… with ILMerge

妖精的绣舞 提交于 2019-12-11 05:38:50
问题 I have 3 projects: A_MainProject (startup project) B_IntermediateProject C_SharedClassLibrary The depencies are: A depends on B & C B depends on C and C depends on System only. Every Project has it's own namespace. As long as no ILMerge is installed, everything works fine. If ILMerge is activated for Project A ("A_MainProject") everything still works fine and one self-contained executable for Project A is generated. If ILMerge is now also activated for the B_IntermediateProject, I get the

ilmerge with a PFX file

落爺英雄遲暮 提交于 2019-12-11 04:39:46
问题 It would appear that VS2012 uses PFX files for signing instead of SNK files. I get the impression this is related to delayed signing; but I don't care. When I build my application, I can use "sn -tp <my assembly>" and see it is signed. When I ilmerge the debug folder and use the /keyfile directive (the way I was successfully doing with SNK files), the DLLs merge into one unsigned DLL. I have read articles suggesting clever workarounds, such as extracting the public key from the original DLL

ILMerge - the command exited with code 255

痴心易碎 提交于 2019-12-11 00:31:28
问题 I'm trying to embed DLLs in single executable using ILMerge. I added this command line in build events > post build event command line: C:\Program Files\Microsoft\ILMerge\ILMerge.exe /out:$(TargetDir)Publish.exe ($TargetDir)foo.dll but when I try to run it, I get the following error: The command "C:\Program Files\Microsoft\ILMerge\ILMerge.exe /out:C:\Publish.exe ($TargetDir)foo.dll" exited with code 255 how can I fix this? 回答1: Looking at the error message, I think ($TargetDir)foo.dll should