Wed Jun 26, 2013 8:06 am
Hi,
can reproduce the problem with every rtf-file conatainig a graphic.
I did not install spire. I just use the spire.doc.dll and the Spire.License.dll as references of my project. The dll-files are copied to a special lib-folder.
I added the spire.pdf.dll to my library-directory and to my project. The I tried to read my rtf-file containig a graphic. And the everythings ok.
There must be a reference to a spire.pdf.dll in the spire-doc.dll. Here is the Stacktrace of the Exception:
System.TypeInitializationException wurde nicht behandelt.
HResult=-2146233036
Message=Der Typeninitialisierer für "sprᨀ" hat eine Ausnahme verursacht.
Source=Spire.Doc
TypeName=sprᨀ
StackTrace:
bei sprᨀ..ctor()
bei spr᳝..ctor(Document A_0)
bei sprជ..ctor(DocumentBase A_0)
bei sprᡓ..ctor(IDocument A_0)
bei spr᧿..ctor(IDocument A_0)
bei Spire.Doc.Fields.DocPicture..ctor(IDocument doc)
bei Spire.Doc.Document.CreateParagraphItem(ParagraphItemType itemType)
bei Spire.Doc.Documents.Paragraph.ᜀ(ParagraphItemType A_0)
bei Spire.Doc.Documents.Paragraph.AppendPicture(Byte[] imageBytes)
bei sprᶈ.ᜆ(String A_0)
bei sprᶈ.ᜏ()
bei sprᶈ.ᜉ(String A_0)
bei sprᶈ.ᜢ()
bei Spire.Doc.Document.ᜁ(Stream A_0, Encoding A_1)
bei Spire.Doc.Document.ᜍ(Stream A_0)
bei Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password)
bei Spire.Doc.Document.ᜀ(String A_0, String A_1)
bei Spire.Doc.Document.LoadFromFile(String fileName)
bei XMLConverter.Form1.button1_Click_1(Object sender, EventArgs e) in c:\Projekte\Bundesanzeiger\RELEASE\3.7.0\source.Client\XMLConverter\XMLConverter\Form1.cs:Zeile 31.
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bei XMLConverter.Program.Main() in c:\Projekte\Bundesanzeiger\RELEASE\3.7.0\source.Client\XMLConverter\XMLConverter\Program.cs:Zeile 18.
bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
InnerException: System.IO.FileNotFoundException
HResult=-2147024894
Message=Die Datei oder Assembly "Spire.Pdf, Version=2.8.26.3040, Culture=neutral, PublicKeyToken=663f351905198cb3" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Source=Spire.Doc
FileName=Spire.Pdf, Version=2.8.26.3040, Culture=neutral, PublicKeyToken=663f351905198cb3
FusionLog==== Zustandsinformationen vor Bindung ===
LOG: Benutzer = MBI\Mark Remlinger
LOG: DisplayName = Spire.Pdf, Version=2.8.26.3040, Culture=neutral, PublicKeyToken=663f351905198cb3
(Fully-specified)
LOG: Appbase = file:///C:/Projekte/Bundesanzeiger/RELEASE/3.7.0/source.Client/XMLConverter/XMLConverter/bin/Debug/
LOG: Ursprünglicher PrivatePath = NULL
Aufruf von Assembly : Spire.Doc, Version=4.9.4.3040, Culture=neutral, PublicKeyToken=663f351905198cb3.
===
LOG: Diese Bindung startet im default-Load-Kontext.
LOG: Es wurde keine Anwendungskonfigurationsdatei gefunden.
LOG: Die Hostkonfigurationsdatei wird verwendet:
LOG: Die Computerkonfigurationsdatei von C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config wird verwendet.
LOG: Verweis nach der Richtlinie: Spire.Pdf, Version=2.8.26.3040, Culture=neutral, PublicKeyToken=663f351905198cb3
LOG: Die gleiche Bindung ist bereits aufgetreten und hat den Fehler hr = 0x80070002 verursacht.
StackTrace:
bei spr⅑.ᜈ(Double A_0)
bei sprᨀ..cctor()
InnerException:
Thank you
Login to view the files attached to this post.