Recently when doing MailChimp integration with Web site functionality, we found that the dependencies SerivceStack.Text.dll in MailChimp.dll in MailChimp 2API (version 3.9.71.0) and website in our Servi The version of CeStack.Text.dll (version 4.0.0.0) conflicts when we wrote Mailchimpmanager MC = new Mailchimpmanager (ApiKey); An assembly exception with SerivceStack.Text.dll (version 3.9.71.0) cannot be loaded when prompted.
We use the Ilmerge tool to combine the two assemblies MailChimp.dll and ServiceStack.Text.dll (version 4.0.0.0) into one assembly and then reference them.
The command is as follows:
C:\Program Files (x86) \microsoft\ilmerge>ilmerge.exe/target:library/targetplat
Form:v4/out: "D:\MailChimp4.dll" "D:\MailChimp.dll" "D:\ServiceStack.Text.dll"/
Wildcards/log: "D:\AandB4.log"
1, first download the latest Ilmerge tool installation package:
Ilmerge is a assembly tool that incorporates. NET, the latest version of the Ilmerge download that supports. NET 4.0:
http://www.microsoft.com/downloads/details.aspx?FamilyID=22914587-b4ad-4eae-87cf-b14ae6a939b0&displaylang=en
Ilmerge usage examples are as follows:
Ilmerge.exe/target:library/targetplatform:v4/out: "E:\Projects\ILMergeTest\A\Ref\AandB4.dll" "E:\Projects\ Ilmergetest\a\a\bin\debug\*.dll "/wildcards/log:" E:\Projects\ILMergeTest\A\Ref\AandB4.log "
Parameter description:
/target:library = "indicates that the build target is a DLL
/TARGETPLATFORM:V4 = "compiler platform for. net4.0
/out: "E:\Projects\ILMergeTest\A\Ref\AandB4.dll" = "Output file path after merging"
"E:\projects\ilmergetest\a\a\bin\debug\*.dll"/wildcards = "merged DLL, because wildcard characters are used here, so it is required." Wildcards
/log: "E:\Projects\ILMergeTest\A\Ref\AandB4.log" = "Output merge Log"
2. Related Reference links Help:
Http://stackoverflow.com/questions/8077570/how-to-merge-multiple-assemblies-into-one
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=17630http://www.cnblogs.com/seeyeah/archive/2011/08/24/2152628.html
Vs references third-party DLL file version inconsistency (Npoi vs. Icsharpcode.sharpziplib version in memcached)