Thursday, March 26, 2009

EPiServer Mail 4.4 and the correct version of EPiServer Shared

Over the last period of time, or actually since the 4.4 release of EPiServer Mail about a month ago, I have been asked quite a few question regarding the compatibility with EPiServer CMS R2 SP1. The main reason is that people have gotten the following error when trying to run the installer.

An unhandled error has occured:
A parameter cannot be found that matches parameter name 'SourceAssemblyName'.
When executing
 
 
At C:\Program Files\EPiServer\Mail\4.4.0.141\Install\System Scripts\Install Sit
e (No Database).ps1:202 char:80
+     Add-EPiAssemblyRedirect -TargetFilePath $webConfigFilePath -SourceAssemblyNa
me  <<<< "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyTok
en=31bf3856ad364e35" -OldVersion "1.0.61025.0"
 
An error has occured and the transaction will be rolled back
Rolledback
 
An unhandled error has occured:
A parameter cannot be found that matches parameter name 'SourceAssemblyName'.
When executing
 
 
At C:\Program Files\EPiServer\Mail\4.4.0.141\Install\System Scripts\Install Sit
e (No Database).ps1:202 char:80
+     Add-EPiAssemblyRedirect -TargetFilePath $webConfigFilePath -SourceAssemblyNa
me  <<<< "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyTok
en=31bf3856ad364e35" -OldVersion "1.0.61025.0"
 
Error - System.Management.Automation.ParameterBindingException: A parameter cannot be found that matches parameter name 'SourceAssemblyName'.
   at System.Management.Automation.CmdletParameterBinderController.VerifyArgumentsProcessed()
   at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
   at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
   at System.Management.Automation.CommandProcessor.BindCommandLineParameters(CommandParameterInternal[] parameters)
   at System.Management.Automation.CommandProcessor.Prepare(CommandParameterInternal[] parameters)
   at System.Management.Automation.CommandProcessorBase.DoPrepare(CommandParameterInternal[] parameters)
   at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)

This is because the wrong version of EPiServer Shared components are installed on the machine. The version of EPiServer Shared are determined by the order you have installed the products and NOT by the order you deployed them with EPiServer Deployment Center. The version of Shared was updated with the SP 1 release of CMS and then again with the release of EPiServer Mail 4.4.

The solution

The latest version of EPiServer Shared, and currently the only version that is working with EPiServer Mail 4.4, is version 1.1.0.71. Take a look in “Programs and Features” to see which version you have installed.

ProgramsAndFeaturesMail

If you have another version simply run the EPiServerShared.msi found in the EPiServer Mail 4.4 download. This will upgrade the Shared components.

Updated!
If you have another version, the easiest is to uninstall that version and then run the EPiServerShared.msi found in the EPiServer Mail 4.4 download. This will upgrade the Shared components. Alternatively follow the steps Paul describes in the comment below. Thanks for the help Paul!

Note: If you run the CMS R2 SP 1 installer after EPiServer Mail 4.4, this will downgrade EPiServer Shared. Simple follow the steps above again to make Mail work again.

4 comments:

Anonymous said...

To do an upgrade you actually need to invoke the Windows Installer from the command line. Just double clicking the MSI file will not work as there is an existing version installed.

To upgrade: Open a command prompt and then run

msiexec /i path to file\EPiServerShared.msi REINSTALL=ALL REINSTALLMODE=vomus

where "path to file" is the folder where the MSI has been saved to.

Alternatively, you can uninstall the old EPiServer Shared first from the Control Panel.

Paul Smith
EPiServer

Tom Stenius said...

Right you are! I have updated the blog post accordingly. Thanks for the tip!

stefan edlund said...

Tom you've done it again. What? Solved my problem.

Thanks
/BG

Tom Stenius said...

Happy to be able to help out!