When using external dlls within our Tridion templates, the
preview or publish of these templates will throw an error stating the external class
cannot be found.
A good solution for this issue is to merge (using the tool
ilmerge) the external dll with the new assembly. This approach does not require signing assemblies or registering
assemblies in the Global Assembly Cache. As a result, we minimise the maintenance needed
on every Content Manager server.
Find here a sample command for the post-build event I wrote for the TBB generation:
ilmerge.exe /out:<resultDLL> <externalDLL> <myNewlyCompiledDLL>
"%TRIDION_HOME%bin\client\TcmUploadAssembly.exe"/verbose/uploadpdb:true
/targeturl:<CMShostname> /folder:<tcmURI> <resultDLL>
If like the solution, you just need to download and install ilmerge. Please check this link if you get an error regarding unresolved assembly reference not allowed. It worked for me :)
I should not forget to mention Cer Veza who came up with the ilmerge idea ;)
ReplyDeleteHey Monica,
ReplyDeleteILMerging assemblies is indeed a valid technical solution to using external functionality in your Tridion TBBs. But be sure to also consider the legal implications. Check the license of the DLL you merge with your TBB to make sure such merging of "their" binaries into "your" commercial project is allowed.
Frank
Good point Frank! Thanks
ReplyDeleteHello,
ReplyDeletePlease i need start with Tridion but i don't know where can find a package to install and tutorial to learn.
can you help me
Thank you
Regards
David Cun
Hello David,
DeleteWhere does your interest in Tridion come from? There is no open source package to install, therefore I recommend you to find a company who works with Tridion and learn on the job :D
Cheers,
Mónica
I shared some options to get started. There's also training!
ReplyDelete