7

I am trying to set up site using below installer.

DD4T.1.31-MVC4-Tridion2013-VS2012-VS2013.

However i am getting an error after i am browsing Site hosted on IIS 8.0

Could not load file or assembly 'Tridion.ContentDelivery, Version=7.0.0.322, Culture=neutral, PublicKeyToken=ddfc895746e5ee6b' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

The version of Tridion.Contentdelivery.dll i am using is 7.1.0.165. I am not sure why and where it is referring other version in Stack Trace of error.

11

When you get errors like this, it's probable that the dd4t version you are trying to install is built against a different version of the contentdelivery dll.

You can either rebuild the dd4t solution with the tridion dlls you are using (download the source, set the references to your contentdelivery dlls, and build, or you can add the following in your web.config (the runtime element might already be added to your web.config, If not, you should add it directly under the root element ""

<runtime>
   <dependentAssembly>
       <assemblyIdentity name="Tridion.ContentDelivery" publicKeyToken="ddfc895746e5ee6b" culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-7.1.0.165" newVersion="7.1.0.165" />
  </dependentAssembly>
</runtime>

Basically, it tells .NET to use the specific version of your assembly, even if the website is built against an older version. More explanation on this can be found on the msdn site http://msdn.microsoft.com/en-us/library/eftw1fys(v=vs.110).aspx

  • 2
    This will probably work in this case but might have unintended side effects if you tried it between 2011sp1 and 2013sp1 for example – Rob Stevenson-Leggett Sep 10 '14 at 14:44
9

Sounds like you're using the Tridion 2013 providers which come with that template.

You should run the following commands from the Package Manager Console:

Uninstall-Package DD4T-Tridion-2013

Install-Package DD4T-Tridion-2013sp1

Then in the DD4TNinjectModule class, change the using statement to match the provider. Lines 11 and 12.

// TODO: Change this line to your providers if you are not using 2013
using DD4T.Providers.SDLTridion2013;

https://github.com/dd4t/dynamic-delivery-4-tridion/blob/master/dotnet/VSIX/DD4T.WebApplication/DD4T.WebApplication/App_Start/DependencyInjection/DD4TNinjectModule.cs

Want to create a new version of the template and give it back to the community? The source code is on GitHub.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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