1

Resolved

Crash on Startup

description

I've downloaded WI Assistant 2.2 and started it and it crashed (no UI was ever shown).
I've attached Visual Studio and here is the exception:
 
System.Windows.Markup.XamlParseException was unhandled
Message="Cannot create instance of 'Main' defined in assembly 'WIAssistant, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'WIAssistant;component/Main.xaml'."
Source="PresentationFramework"
LineNumber=0
LinePosition=0
StackTrace:
   at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
   at System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
   at System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
   at System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId)
   at System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
   at System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
   at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
   at System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
   at System.Windows.Markup.TreeBuilder.Parse()
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
   at System.Windows.Application.DoStartup()
   at System.Windows.Application.<.ctor>b__0(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunInternal(Window window)
   at WIAssistant.App.Main()
InnerException: System.Reflection.TargetInvocationException
   Message="Exception has been thrown by the target of an invocation."
   Source="mscorlib"
   StackTrace:
        at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
        at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
        at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
        at System.Activator.CreateInstance(Type type, Boolean nonPublic)
        at System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
   InnerException: System.TypeInitializationException
        Message="The type initializer for 'WIAssistant.MainMediator' threw an exception."
        Source="WIAssistant"
        TypeName="WIAssistant.MainMediator"
        StackTrace:
             at WIAssistant.MainMediator..ctor(IMain main)
             at WIAssistant.Main..ctor()
        InnerException: System.IO.FileNotFoundException
             Message="Could not load file or assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."
             Source="WIAssistant"
             FileName="Microsoft.TeamFoundation.WorkItemTracking.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
             FusionLog="WRN: Assembly binding logging is turned OFF.\r\nTo enable assembly bind failure logging, set the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog] (DWORD) to 1.\r\nNote: There is some performance penalty associated with assembly bind failure logging.\r\nTo turn this feature off, remove the registry value [HKLM\\Software\\Microsoft\\Fusion!EnableLog].\r\n"
             StackTrace:
                  at WIAssistant.MainMediator..cctor()
             InnerException:

comments

Vaccanoll wrote Mar 5, 2010 at 5:12 PM

Do you have Team Explorer 2008 Installed? The error message indicates that it cannot find Microsoft.TeamFoundation.WorkItemTracking.Client. I think that is installed with Team Explorer 2008. Team Explorer 2008 is a free download from Microsoft.

Vaccanoll wrote Mar 5, 2010 at 10:52 PM

wrote Mar 5, 2010 at 10:53 PM

wrote Mar 6, 2010 at 3:50 AM

wrote Mar 6, 2010 at 3:50 AM

Scordo wrote Mar 7, 2010 at 1:42 AM

I think the real cause it, that the project is not explicitly compiled as X86. I'm on x54 with VS 2008 and Teamexplorer instaled. This exception is normally caused when a running a 64 bit .net app thats using the 32 bit Teamsystem assemblies.

Vaccanoll wrote Mar 8, 2010 at 6:49 PM

The next version will be released as X86. Until then see this blog post on how to force X64 mode:
http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64-bit-Windows.aspx

wrote Feb 2, 2013 at 2:23 AM

wrote May 9, 2013 at 1:50 PM

wrote May 9, 2013 at 1:50 PM

wrote Jun 4, 2013 at 2:14 AM