4.3 -> 4.4 update hell
After installing the 4.4 update and selecting "Upgrade" from the Sitefinity Project Manager, config file version info is not automatically updated from 4.3.1885.0 to 4.4.2117.0 resulting in the following error when accessing the site:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
|
|
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
|
Hi Stevev,
Thank you for posting your issues in the forums.
Lets try to examine what is causing the upgrade issue. From the first stack trace posted it seems that there is an assembly in your project referencing the old version of Sitefinity (Sitefinity 4.3 SP1). This can be caused by third party extensions, such as controls and modules from the Sitefinity Marketplace or from custom projects built by your team that reference the Sitefinity assemblies.
When you upgrade a project, the Sitefinity Project Manager will replace the previous version assemblies, with the new ones. This process is described in the Sitefinity Upgrade guide. Step 4 of the upgrade process describes what you have to do with third party extensions:
Select the project which you want to upgrade and click Upgrade button.
The selected project is upgraded to the latest version of Sitefinity Project Manager.
IMPORTANT: If your project is part of a larger solution where you have custom projects that reference Sitefinity assemblies, check the references to those assemblies in your project and make sure that they are referencing the newer assemblies.
Since your application cannot start up, due to unresolved references the database itself will not be upgraded. The upgrade of the database happens when you first run the project with the new assemblies. This is why you are not seeing updates in the Sitefinity configuration files. Once the website starts up and the upgrade process of the database is initiated Sitefinity will produce an upgrade log located in ~/App_Data/Stiefinity/Logs directory of your project. This log will tell you which components passed the upgrade process and if there are any failures. If there are failures, please do not touch the configuration files manually (this is also mentioned in the documentation: IMPORTANT: You must not manually change the Sitefinity version numbers stored in your configuration files.) Instead go over the upgrade trace log and the error log to determine why a component was not upgraded.
At the moment what you can do with third party extensions referring the old Sitefinity assemblies is to perform an assembly binding redirect in the web.config so that they know they need to use the new Sitefinity version. The binding redirect should look like the bellow configuration:
<
runtime
>
<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
probing
privatePath
=
"bin;sitefinity\admin\bin"
/>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Telerik.Sitefinity"
publicKeyToken
=
"b28c218413bdf563"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"4.3.1885.0"
newVersion
=
"4.4.2117.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
</
runtime
>
Hi Radoslav,
Thanks for the quick reply. This project isn't using any third part components and all custom controls are contained in the main SF project so there are no other projects referencing older SF assemblies. I have added only one dll reference which is essentially a utlity library with no dependancies to SF assemblies. I restored my backup solution and tried the upgrade proceedure again. This time, everything worked as expected. The only difference is that I rebooted prior to running the Sitefinity Project Manager Upgrade.
Regarding the "Upgrade Guide"; Take a look at the 4.4 download page and the 4.4 release announcement email--there's no mention of an upgrade guide. Yes, the download page has a link to an installation guide but SF was already installed on my computer so know how to install it. From a user perspective I think it makes much more sense the include the guide in the download package rather than burying a link to it in the installation guide, particularly, if there are important steps that need to be carried out. Clearly, I could have been more diligent in looking for this information but I would expect Telerik to be a bit more proactive making sure I have all the bits I need to upgrade the product.
One last comment; the Sitefinity Project Manager Upgrade process includes a warning regarding backing up the project before running the upgrade but make no mention of the database. A warning that the database will be modified and should also be backed up would be helpful.
Thanks for the help--Steve
After adding a couple of Telerik controls from the VS toolbox, I no get the following exception when I attempt to build the solution:
Error 46 Assembly 'Telerik.Sitefinity, Version=4.4.2117.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' uses 'Telerik.Web.UI, Version=2011.3.1115.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' which has a higher version than referenced assembly 'Telerik.Web.UI, Version=2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' c:\Program Files (x86)\Telerik\Sitefinity 4.3\Projects\NLG Sitefinity Site\bin\Telerik.Sitefinity.dll NLGSitefinityWebApp
If you have something in the solution which references Telerik.Web.UI, and has the "Copy Local" property set to true, it would have overwritten the newer 1115.40 version that comes with 4.4. Perhaps that reference is pointing at the GAC and you have the Q2 2011 RadControls installed on your machine?
That'd be my guess anyway...
Like Radoslav said, there's something in your project that was built against the old assembly, thats the only reason you'd get that error.
Dear SteveV
For whatever reason when you rebuild a project you loose some DLLs and/or references. At least it happens to me and is a major pain in the .... you know where.
What I usally do is create an empty 4.4 project. Copy all the DLLs over to my project and use only BUILD and NOT rebuild or clean.
Markus
Hi Steve,
If that's the case then wouldn't manually copying the newer version of the dll over the older one have resulted in the same problem. In other words; if I did have something in my solution that references the older version of the Telerik.Web.UI and I overwrote the older version in my bin folder with the new version, I would expect the the older version would reappear after building the solution but It doesn't. And as I indicated in a previous post I'm not using any third party components in the solution. My guess is that something failed silently during the portion of the upgrade that copies over the new versions.
@ Marcus:
I've had this very annoying issue as well and have done the same as you to fix the problem. I opened a support ticket on the disappearing dlls several weeks ago. The ticket didn't result in much other than no-one else has reported this issue. I included a post reference to at least one other person having the issue (don't think it was you). So if you're seeing this I'd urge you to open a support ticket as well.
Hi SteveV,
Do you have any custom or user controls, written by you, that might reference the old version of the assemblies? It doesn't have to be third party controls. You can open all .csproj files with a text editor and search for the string "1885" inside them - as if you references a specific version of an assembly it will be stored in plain text inside the .csproj file.
Kind regards,Hi Lubomir,
All of my custom controls are part of the website project so there'e only one .csproj file. I searched for 1885 and got no results. Searching for "Telerik.Web.UI" returns only one instance which looks like so:
<
Reference
Include
=
"Telerik.Web.UI, Version=2010.2.929.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL"
>
<
SpecificVersion
>False</
SpecificVersion
>
<
HintPath
>bin\Telerik.Web.UI.dll</
HintPath
>
<
Private
>True</
Private
>
</
Reference
>
Hi Steve,
Could you try removing the version part from the reference and leave just
<Reference Include="Telerik.Web.UI">