I've got a fresh install of Tridion 2013 which works quite nicely. When I went to install the Razor Mediator, though, the wizard failed with the following message:
There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.
Which isn't terribly helpful. I was quite surprised by this failure as I wasn't aware of any architectural changes going from Tridion 2011 SP1 -> Tridion 2013 which would prohibit the installer from succeeding. Undeterred, I consulted the Razor Mediator documentation and, as I understand it, this is what needs to happen:
The [TRIDION]\config\Tridion.ContentManager.config file has to be made aware that there is such a thing as a Razor template and that a mediator for it exists. This is done with an
<add>
tag inside<templateTypes>
that specifies the contentHandler classes, the .dll name in which the classes reside, and the public key with which to access that .dll inside the GAC. Then, inside<mediators>
the same .dll needs to be referenced as the location for the .cshtml MIME type mediator.From 1, that .dll needs to exist in the GAC and have the appropriate public key.
So I did the following:
Installed the MVC 4 Framework to ensure that the system knew what Razor was and how to use it independent of Tridion or the mediator.
Re-compiled the Tridion.Extensions.Mediators.Razor.dll against the Tridion 2013 assemblies that it references, instead of the 2011 SP1 versions that are included in the installer's version of the .dll.
Created the directory structure \GAC_MSIL\Tridion.Extensions.Mediators.Razor\v4.0_1.3.0.0__{$KEY}, where {$KEY} is the string defined in the Razor Mediator source code, and placed the recompiled .dll inside of it.
Added the XML configuration sections as per the strings defined in the mediator installer source code to the Tridion.ContentManager.config file. The {$KEY} in the XML definitions is, of course, the same as the {$KEY} in the GAC directory.
The result of this is that the Tridion Content Manager is aware that it has a template type called RazorTemplate - when creating a new TBB I can select this as one of the options. However, if I attempt to save a TBB using this template - or if I try to use ContentPorter 2013 to bring in content which uses RazorTemplate from a 2011 SP1 setup - I get a Null Reference error. This leads me to believe that when Tridion is failing to find the .dll for the mediator - but I'm stumped as to why that might be.
So my questions are these - just trying to get an idea of what to start looking at next:
Is my understanding of the Mediator install process correct?
Has anyone successfully used the install wizard for the Razor Mediator on a Tridion 2013 implementation? If so, then the problem is likely with, I don't know, my permissions or something else which is causing it to fail.
If the public keys are correct, what else could cause a .dll lookup to the GAC to fail?
Could something else be causing the null reference?
Oh, and I'm using Windows Server 2008 R2 SP1.
Thanks very much for taking the time to read all of this! Hopefully, someone with more experience in these matters can spot the mistake I've made or help clarify my thinking. :)