"Unable to load requested types" error when loading DD4T.Templates.dll with TcmUploadAssembly
Trying to reload DD4T.Templates.dll in Tridion 2011 SP1 using TcmUploadAssembly in Tridion Tools DD4T folder - I made sure the required DLLs are loaded - DD4T.ContentModel.Contracts.dll, DD4T.ContentModel.dll, DD4T.Templates.Base.dll - but I keep getting "Error: Unable to load another of the requested types".
Checking the Fusion log I see the following binding issue:
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.
Not sure where this TcmUploadAssembly.XmlSerializers came from?
There is a DD4T.ContentModel.XmlSerializers.dll file in the build folder, but it looks like it is combined with others to form DD4T.Templates.merged.dll - but I don't know what it is for.
Not sure where to start - is it a DD4T issue or a TcmUploadAssembly issue? (I tried the same steps with TcmUploadAssembly in Tridion 2011 SP1, but got the same error albeit for the new TcmUploadAssembly.XmlSerializers, version 6.1.0.996)
Edit Apologies for the confusion - I've added DD4T assemblies to the GAC. My original post "I made sure the required DLLs were loaded" is misleading, but I meant loading into the GAC!
I'll check Mihai's link about registering with .NET 4 - it was late at night when I did it!
source to share
Version 5.4 is Tridion 2009. I don't think using TcmUploadAssembly from T2009 will work with T2011. So I definitely suggest using the latest TcmUploadAssembly (v6.1.0.966 for T2011SP1).
Have you registered the dark DLLs DD4T.ContentModel.Contracts.dll
, DD4T.ContentModel.dll
and DD4T.Templates.Base.dll
in the GAC on your TCM server? Just downloading them isn't enough. Take a look at http://code.google.com/p/dynamic-delivery-4-tridion/wiki/40_Templates .
Also I see that your error is in .NET 2. Have you registered the DLLs with .NET 4?
source to share
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 loads the DD4T.Templates.Merged.dll into Tridion which includes the template DLL + all dependent DLLs bundled by ILMerge.
If you don't like ILMerge for any 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 obtain these DLLs by downloading the source code, opening the Dynamic Delivery Publishing.sln solution and building it.
source to share