locked
Sequencing a .Net4 built application - Runtime Error RRS feed

  • Question

  • Hi, hope someone can offer some help..

    We have an in house application built with the .net4 framework. When I sequence the app it fails to launch in the sequencer and in the event log I get:

    Event Type:        Error

    Event Source:    .NET Runtime

    Event Category:                None

    Event ID:              1026

    Date:                     25/01/2011

    Time:                     13:57:31

    User:                     N/A

    Computer:          ********

    Description:

    Application: TestWindowsApp.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.Windows.Markup.XamlParseException

    Stack:

       at System.Windows.Markup.XamlReader.RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)

       at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)

       at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)

       at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)

       at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)

       at System.Windows.Application.LoadComponent(System.Uri, Boolean)

       at System.Windows.Application.DoStartup()

       at System.Windows.Application.<.ctor>b__1(System.Object)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

       at System.Windows.Threading.DispatcherOperation.InvokeImpl()

       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)

       at System.Threading.ExecutionContext.runTryCode(System.Object)

       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)

       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)

       at System.Windows.Threading.DispatcherOperation.Invoke()

       at System.Windows.Threading.Dispatcher.ProcessQueue()

       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)

       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)

       at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)

       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)

       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)

       at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)

       at System.Windows.Threading.Dispatcher.Run()

       at System.Windows.Application.RunDispatcher(System.Object)

       at System.Windows.Application.RunInternal(System.Windows.Window)

       at System.Windows.Application.Run(System.Windows.Window)

       at TestWindowsApp.App.Main()

    The sequencer pc is 32bit XP SP3 with all versions of .net framework installed including .net 4. I am using AppV 4.6 sequencer x86.

    We have also built a .net 4 "Hello World" app that has the same issue. Then we built the same app in .net 3.5 and it worked fine.

    We added some code to capture the unhandled exception and got:

    Event Type: Error
    Event Source: .NET Runtime
    Event Category: None
    Event ID: 1026
    Date:  25/01/2011
    Time:  16:06:36
    User:  N/A
    Computer: ********
    Description:
    Application: Latest 4.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.IO.FileNotFoundException
    Stack:
       at System.Windows.Media.MediaSystem.ConnectTransport()
       at System.Windows.Media.MediaSystem.Startup(System.Windows.Media.MediaContext)
       at System.Windows.Media.MediaContext..ctor(System.Windows.Threading.Dispatcher)
       at System.Windows.Media.MediaContext.From(System.Windows.Threading.Dispatcher)
       at System.Windows.Interop.HwndTarget..ctor(IntPtr)
       at System.Windows.Interop.HwndSource.Initialize(System.Windows.Interop.HwndSourceParameters)
       at System.Windows.Interop.HwndSource..ctor(System.Windows.Interop.HwndSourceParameters)
       at System.Windows.Window.CreateSourceWindow(Boolean)
       at System.Windows.Window.CreateSourceWindowDuringShow()
       at System.Windows.Window.SafeCreateWindowDuringShow()
       at System.Windows.Window.ShowHelper(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
       at System.Threading.ExecutionContext.runTryCode(System.Object)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
       at System.Windows.Threading.Dispatcher.InvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(System.Object)
       at System.Windows.Application.RunInternal(System.Windows.Window)
       at System.Windows.Application.Run(System.Windows.Window)
       at Latest_4.App.Main()

     

    Has anyone else come across problems with Sequencing .net4 apps?

    Many Thanks for any help...

     

    • Moved by Aaron.ParkerModerator Thursday, August 11, 2011 7:59 PM Please do not post questions in the Sequencing Recipe forum (From:App-V Sequencing Recipe Forum)
    Tuesday, January 25, 2011 8:51 PM

Answers

  • Hello,

    If you use process monitor you could probably detect what file was missing - as stated by the error message.

    Recommended approach would be to have .NET Framework 4.0 installed on the end-point you are running the application from.

    (even though you can include .NET Framework 4.0 in a package)

    • Proposed as answer by znack Wednesday, March 2, 2011 2:40 PM
    • Unproposed as answer by Aaron.ParkerModerator Thursday, August 11, 2011 7:59 PM
    • Edited by znack Tuesday, November 22, 2011 8:46 AM
    • Proposed as answer by znack Tuesday, November 22, 2011 8:46 AM
    • Marked as answer by Aaron.ParkerModerator Saturday, November 17, 2012 11:45 AM
    Wednesday, March 2, 2011 2:40 PM