Error "Unable to load requested types" when uploading DD4T.Templates.dll using TcmUploadAssembly

Go To StackoverFlow.com

3

Trying to reupload the DD4T.Templates.dll into Tridion 2011 SP1 using the TcmUploadAssembly in the DD4T Tridion Tools folder - I've made sure the necessary DLLs are uploaded - DD4T.ContentModel.Contracts.dll, DD4T.ContentModel.dll, DD4T.Templates.Base.dll - but I keep getting "Error: Unable to load one more of the requested types".

Checking the Fusion log, I can see the following binding problem:

LOG: DisplayName = TcmUploadAssembly.XmlSerializers, Version=5.4.0.509, Culture=neutral, PublicKeyToken=360aac4d3354074b, processorArchitecture=MSIL
 (Fully-specified)
LOG: Appbase = file:///D:/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = TcmUploadAssembly.exe
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: TcmUploadAssembly.XmlSerializers, Version=5.4.0.509, Culture=neutral, PublicKeyToken=360aac4d3354074b, processorArchitecture=MSIL
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers/TcmUploadAssembly.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///D:/TcmUploadAssembly.XmlSerializers/TcmUploadAssembly.XmlSerializers.EXE.
LOG: All probing URLs attempted and failed.

No idea where this TcmUploadAssembly.XmlSerializers comes from?

There is a DD4T.ContentModel.XmlSerializers.dll in the build folder but this seems to be merged with others to form DD4T.Templates.merged.dll - but I've no idea what this is for.

Not sure where to start - is this a DD4T problem or a TcmUploadAssembly problem? (I have tried the same steps with the TcmUploadAssembly in the Tridion 2011 SP1 install but got the same error, albeit for a newer TcmUploadAssembly.XmlSerializers, version 6.1.0.996)

Edit Apologies for the confusion - I had added the DD4T assemblies into the GAC. My original post "I've made sure the necessary DLLs are uploaded" was misleading but I meant loaded into the GAC!

I'll check Mihai's point about registering with .NET 4 - it was late last night when I did this!

2012-04-04 21:08
by Neil
Isn't there something that should go in the GAC for DD4T templates - Nuno Linhares 2012-04-04 21:20
There is no way to make one DLL you upload to TCM refer to another DLL you upload to TCM. That's why any common functionality will typically have to be put into the GAC, as indeed both Nuno and Mihai point out (and as is documented on the DD4T page Mihai refers to) - Frank van Puffelen 2012-04-05 00:43


5

Version 5.4 is Tridion 2009. I don't think using TcmUploadAssembly from T2009 would work with T2011. So I definitely suggest using the latest TcmUploadAssembly (v6.1.0.966 for T2011SP1).

Have you registered the Templating DLLs DD4T.ContentModel.Contracts.dll, DD4T.ContentModel.dll and DD4T.Templates.Base.dll into the GAC on your TCM server? Just uploading them is not enough. Have a look at http://code.google.com/p/dynamic-delivery-4-tridion/wiki/40_Templates.

Also I see your error refers to .NET 2. Did you register the DLLs using .NET 4?

2012-04-04 22:57
by Mihai Cădariu
Alternatively, you can use the DD4T template installer. It merges all the required DLLs (DD4T.ContentModel, DD4T.ContentModel.Contracts and DD4T.Templates.Base) with the actual templates into one single DLL, and uploads that. In that case, you do not need to put anything in the GAC. The installer can be downloaded as a zip from http://code.google.com/p/dynamic-delivery-4-tridion/downloads/list - Quirijn 2012-04-05 06:42


0

The recommended approach is to download the installer from https://code.google.com/p/dynamic-delivery-4-tridion/downloads/detail?name=DD4T-template-installer-1.31.zip. This uploads DD4T.Templates.Merged.dll into Tridion, which includes the template DLL + all dependent DLLs merged together by ILMerge.

If you don't like ILMerge for whatever reason, you can put the following DLLs in the GAC:

  • DD4T.ContentModel.dll
  • DD4T.ContentModel.Contracts.dll
  • DD4T.Templates.Base.dll
  • DD4T.ContentModel.XmlSerializers.dll

You can get these DLLs by downloading the source code, opening the Dynamic Delivery Publishing.sln solution, and building it.

2015-03-16 15:54
by Quirijn
Ads