Can't install App Layering Agent, "System.MissingMethodException"

Can't install App Layering Agent, "System.MissingMethodException"

book

Article ID: CTX236862

calendar_today

Updated On:

Description

The Citrix Agent install fails because the Agent won't start.  Windows says there was a timeout waiting for the service, but in reality it immediately crashes with a .Net error in the Windows Application event log.

Application Log events:

Log Name:      Application
Source:        Application Error
Date:          5/31/2018 4:10:15 PM
Event ID:      1000
Task Category: Application Crashing Events
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ComputerName
Description:
Faulting application name: Citrix.AppLayering.Agent.Service.exe, version: 4.10.0.14606, time stamp: 0x5aafec57
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18895, time stamp: 0x5a4b1cf7
Exception code: 0xe0434352
Fault offset: 0x00000000000092fc
Faulting process id: 0x8024
Faulting application start time: 0x01d3f91b5a5c5df7
Faulting application path: C:\Program Files (x86)\Citrix\Agent\Citrix.AppLayering.Agent.Service.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: a15b981a-650e-11e8-80ed-005056aa2ca7

Log Name:      Application
Source:        .NET Runtime
Date:          5/31/2018 4:10:00 PM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      ComputerName
Description:
Application: Citrix.AppLayering.Agent.Service.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.MissingMethodException
   at Castle.Facilities.WcfIntegration.WcfBehaviorActivator..ctor(Castle.Core.ComponentModel, Castle.MicroKernel.IKernel, Castle.MicroKernel.ComponentInstanceDelegate, Castle.MicroKernel.ComponentInstanceDelegate)
   at DynamicClass.lambda_method(System.Runtime.CompilerServices.Closure, System.Object[])
   at Castle.Core.Internal.ReflectionUtil.Instantiate(System.Reflection.ConstructorInfo, System.Object[])
   at Castle.Core.Internal.ReflectionUtil.Instantiate[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Type, System.Object[])
   at Castle.MicroKernel.DefaultKernel.CreateComponentActivator(Castle.Core.ComponentModel)

Exception Info: Castle.MicroKernel.KernelException
   at Castle.MicroKernel.DefaultKernel.CreateComponentActivator(Castle.Core.ComponentModel)
   at Castle.MicroKernel.Handlers.DefaultHandler.InitDependencies()
   at Castle.MicroKernel.Handlers.AbstractHandler.Init(Castle.MicroKernel.IKernelInternal)
   at Castle.MicroKernel.Handlers.DefaultHandlerFactory.Create(Castle.Core.ComponentModel)
   at Castle.MicroKernel.DefaultKernel.AddCustomComponent(Castle.Core.ComponentModel)
   at Castle.MicroKernel.DefaultKernel.Register(Castle.MicroKernel.Registration.IRegistration[])
   at Castle.Windsor.WindsorContainer.Register(Castle.MicroKernel.Registration.IRegistration[])
   at Castle.Windsor.Installer.AssemblyInstaller.Install(Castle.Windsor.IWindsorContainer, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore)
   at Castle.Windsor.WindsorContainer.Install(Castle.MicroKernel.Registration.IWindsorInstaller[], Castle.Windsor.Installer.DefaultComponentInstaller)
   at Castle.Windsor.WindsorContainer.Install(Castle.MicroKernel.Registration.IWindsorInstaller[])
   at Citrix.AppLayering.Agent.Service.Program.ConfigureWindsorForService()
   at Citrix.AppLayering.Agent.Service.Program.Main(System.String[])

Resolution

Uninstall StoreFront.  You might not have wanted StoreFront on your PVS server in the first place.  But StoreFront and the App Layering Agent use different versions of the same modules (Castle.Core and Castle.Windsor).  Normally, these assemblies coexist side-by-side without interference, but StoreFront forces a redirect from the version we use to the version they use, breaking our code.  The only workaround, for now, is to uninstall StoreFront from the machine where you want to install the App Layering Agent.


Problem Cause

The problem is caused by the App Layering Agent and StoreFront using different assembly versions, and StoreFront forcing a global redirect from our version to theirs (which are not binary compatible).  So effectively, StoreFront and the App Layering Agent cannot be on the same machine.