1
Vote

Failed object initialization (ISupportInitialize.EndInit). Exception

description

Dowloaded Source and IrrKlang from http://www.ambiera.com/irrklang/downloads.html but when I tried to run it I got the following error. Please let me know if you understand why this is happening , Terry:
 
Failed object initialization (ISupportInitialize.EndInit). Exception has been thrown by the target of an invocation. Error at object 'bodies' in markup file 'WPFPhysicsPlus;component/window1.xaml' Line 17 Position 5.
 
Excpetion Detail:
 
System.Windows.Markup.XamlParseException occurred
Message="Failed object initialization (ISupportInitialize.EndInit). Exception has been thrown by the target of an invocation. Error at object 'bodies' in markup file 'WPFPhysicsPlus;component/window1.xaml' Line 17 Position 5."
Source="PresentationFramework"
LineNumber=17
LinePosition=5
NameContext="Resources"
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.ElementEndInit(Object& element)
   at System.Windows.Markup.BamlRecordReader.ReadElementEndRecord(Boolean fromNestedBamlRecordReader)
   at System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
   at System.Windows.Markup.BamlRecordReader.ReadElement(Int64 startPosition, XamlObjectIds contextXamlObjectIds, Object dictionaryKey)
   at System.Windows.ResourceDictionary.CreateObject(Int32 valuePosition, Object key)
   at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache)
   at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache)
   at System.Windows.FrameworkElement.FindResourceOnSelf(Object resourceKey, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.Markup.BamlRecordReader.FindResourceInParserStack(Object resourceNameObject, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.Markup.BamlRecordReader.FindResourceInParentChain(Object resourceNameObject, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   at System.Windows.StaticResourceExtension.ProvideValueInternal(IBamlReader bamlReader, Object targetObject, Object targetProperty, Boolean allowDeferredReference)
   at System.Windows.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider)
   at System.Windows.Markup.BamlRecordReader.ProvideValueFromMarkupExtension(MarkupExtension markupExtension, Object obj, Object member)
   at System.Windows.Markup.BamlRecordReader.BaseReadOptimizedMarkupExtension(Object element, Int16 attributeId, PropertyDefinition propertyDefinition, Object value)
   at System.Windows.Markup.BamlRecordReader.ReadPropertyWithExtensionRecord(BamlPropertyWithExtensionRecord bamlPropertyRecord)
   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.LoadComponent(Object component, Uri resourceLocator)
   at WPFPhysics1.Window1.InitializeComponent() in c:\Clancy\Dev_Clancy\Samples\WPF_2D_PhysicsPlus\WPFPhysics1\Window1.xaml:line 1
   at WPFPhysics1.Window1..ctor() in C:\Clancy\Dev_Clancy\Samples\WPF_2D_PhysicsPlus\WPFPhysics1\Window1.xaml.cs:line 61
InnerException: System.Reflection.TargetInvocationException
   Message="Exception has been thrown by the target of an invocation."
   Source="PresentationFramework"
   StackTrace:
        at System.Windows.Data.ObjectDataProvider.CreateObjectInstance(Exception& e)
        at System.Windows.Data.ObjectDataProvider.QueryWorker(Object obj)
        at System.Windows.Data.DataSourceProvider.EndInit()
        at System.Windows.Markup.BamlRecordReader.ElementEndInit(Object& element)
   InnerException: System.BadImageFormatException
        Message="Could not load file or assembly 'irrKlang.NET2.0, Version=1.1.3.0, Culture=neutral, PublicKeyToken=a854741bd80517c7' or one of its dependencies. An attempt was made to load a program with an incorrect format."
        Source="WPFPhysicsPlus"
        FileName="irrKlang.NET2.0, Version=1.1.3.0, Culture=neutral, PublicKeyToken=a854741bd80517c7"
        FusionLog="=== Pre-bind state information ===\r\nLOG: User = REDMOND\\terrycl\r\nLOG: DisplayName = irrKlang.NET2.0, Version=1.1.3.0, Culture=neutral, PublicKeyToken=a854741bd80517c7\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Clancy/Dev_Clancy/Samples/WPF_2D_PhysicsPlus/WPFPhysics1/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : WPFPhysicsPlus, Version=1.0.3643.30570, Culture=neutral, PublicKeyToken=null.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\config\\machine.config.\r\nLOG: Post-policy reference: irrKlang.NET2.0, Version=1.1.3.0, Culture=neutral, PublicKeyToken=a854741bd80517c7\r\nLOG: Attempting download of new URL file:///C:/Clancy/Dev_Clancy/Samples/WPF_2D_PhysicsPlus/WPFPhysics1/bin/Debug/irrKlang.NET2.0.DLL.\r\nERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.\r\n"
        StackTrace:
             at WPFPhysics1.Bodies..ctor(Double worldWidth, Double worldHeight)
        InnerException:

comments