5

I am following this blog post.

It says that you need to deploy the referenced dll's to the Tridion bin folder but when running my TBB in Template Builder it can't find/load the dll's.

I can't find a decent answer if it's possible to do so or that it is mandatory to deploy them in the GAC - that's something I'd rather not do.

Can someone who has experience with referencing third party dll's from a TBB shed some light on this matter please?

[added]

As you can see in the binding information it's only looking in the templating directory. I would have suspected it to look in Tridion\Bin. Created a folder in the templating dir for the YUI Compressor so it's loading that one but there must be another way.

=== Pre-bind state information ===
LOG: User = NT AUTHORITY\NETWORK SERVICE
LOG: DisplayName = EcmaScript.NET, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///c:/program files (x86)/Tridion/templating/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = TcmTemplateDebugHost.exe
Calling assembly : Yahoo.Yui.Compressor, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\program files (x86)\Tridion\templating\TcmTemplateDebugHost.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///c:/program files (x86)/Tridion/templating/EcmaScript.NET.DLL.
LOG: Attempting download of new URL file:///c:/program files (x86)/Tridion/templating/EcmaScript.NET/EcmaScript.NET.DLL.
LOG: Attempting download of new URL file:///c:/program files (x86)/Tridion/templating/EcmaScript.NET.EXE.
LOG: Attempting download of new URL file:///c:/program files (x86)/Tridion/templating/EcmaScript.NET/EcmaScript.NET.EXE.
LOG: All probing URLs attempted and failed.
2
  • Did you restart everything once you'd placed the files in the \bin folder? Commented May 21, 2014 at 9:17
  • Yes the whole shabang. Services, COM+, and IISReset. I can see in the Assembly Binding Log Viewer that it's looking in the templating directory for the dll's Commented May 21, 2014 at 12:19

2 Answers 2

3

Looks like you've solved it. If you were executing your template via publishing, then, IIRC the DLLs should be in Tridion/bin or GAC. However, Template Builder looks for them, as you found out, in the /templating directory.

In my implementation as per the blog post, I believe we put the third-party assembly in the GAC.

4
  • I was trying to not put those third party dll's in the GAC for sake of visibility and managebility, but if it can't be helped it can't be helped. Commented May 21, 2014 at 14:08
  • Too bad one of the dll's isn't strongly named. Damn you Yahoo.YUI.Compressor Commented May 21, 2014 at 14:14
  • 1
    Then just put it in both places Commented May 21, 2014 at 19:41
  • Or grab the source code and compile your own with a strong name (yuicompressor.codeplex.com/SourceControl/latest) Commented Jun 4, 2014 at 12:14
2

We had a similar issue of referring a 3rd party DLL from the templating code. Instead of putting the 3rd party DLL in GAC which requires approvals from the clients, we used ILMerge to merge the 3rd party DLL and the templating DLL.

This works perfect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.