C# 窗口表面项目上的vncsharp错误

C# 窗口表面项目上的vncsharp错误,c#,wpf,pixelsense,vnc,C#,Wpf,Pixelsense,Vnc,我对使用Microsoft Visual C#2010进行C#编程不熟悉,当我尝试使用VncSharpWpf.dll作为参考时,我需要有关XamlParseExcepion的帮助。出现以下错误 库的链接和示例代码来自: 当我尝试将相同的代码添加到作者提供的示例代码中时(即,将曲面库导入到项目中,相同的代码起作用) 我不知道是什么原因导致库在每次尝试加载新创建的surface项目时崩溃 是否有人可以指导我使用什么软件/方法来识别和解决此类问题 错误是: System.Windows.Markup.

我对使用Microsoft Visual C#2010进行C#编程不熟悉,当我尝试使用
VncSharpWpf.dll
作为参考时,我需要有关
XamlParseExcepion
的帮助。出现以下错误

库的链接和示例代码来自:

当我尝试将相同的代码添加到作者提供的示例代码中时(即,将曲面库导入到项目中,相同的代码起作用)

我不知道是什么原因导致库在每次尝试加载新创建的surface项目时崩溃

是否有人可以指导我使用什么软件/方法来识别和解决此类问题

错误是:

System.Windows.Markup.XamlParseException was unhandled
  Message='The invocation of the constructor on type 'TestVncSharpWpf.SurfaceWindow1' that matches the specified binding constraints threw an exception.' Line number '5' and line position '5'.
  Source=PresentationFramework
  LineNumber=5
  LinePosition=5
  StackTrace:
       at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
       at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
       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.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
       at System.Windows.Application.DoStartup()
       at System.Windows.Application.<.ctor>b__1(Object unused)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, 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, Boolean ignoreSyncCtx)
       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, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       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.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run()
       at TestVncSharpWpf.App.Main() in C:\surface\TestVncSharpWpf\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.BadImageFormatException
       Message=Could not load file or assembly 'VncSharpWpf, Version=0.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
       Source=TestVncSharpWpf
       FileName=VncSharpWpf, Version=0.0.0.1, Culture=neutral, PublicKeyToken=null
       FusionLog==== Pre-bind state information ===
LOG: User = test-PC\test
LOG: DisplayName = VncSharpWpf, Version=0.0.0.1, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///C:/surface/TestVNCSharpWPF/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : TestVncSharpWpf, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/surface/TestVNCSharpWPF/bin/Debug/VncSharpWpf.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

       StackTrace:
            at TestVncSharpWpf.SurfaceWindow1..ctor()
       InnerException: 
System.Windows.Markup.XamlParseException未处理
Message='TestVncSharpWpf.SurfaceWindow1类型上与指定绑定约束匹配的构造函数调用引发异常。'行号'5'和行位置'5'。
Source=PresentationFramework
行号=5
LinePosition=5
堆栈跟踪:
在System.Windows.Markup.WpfXamlLoader.Load(XamlReader XamlReader、IXamlObjectWriterFactory writerFactory、Boolean skipJournaledProperties、Object rootObject、XamlObjectWriterSettings设置、Uri baseUri)
位于System.Windows.Markup.wpfxamloader.LoadBaml(XamlReader XamlReader、Boolean skipJournaledProperties、Object rootObject、XamlAccessLevel accessLevel、Uri baseUri)
位于System.Windows.Markup.XamlReader.LoadBaml(Stream-Stream,ParserContext-ParserContext,Object-parent,Boolean-closeStream)
在System.Windows.Application.LoadBamlStreamWithSyncInfo(流,ParserContext pc)
位于System.Windows.Application.LoadComponent(Uri resourceLocator,布尔bSkipJournaledProperties)
在System.Windows.Application.DoStartup()中
在System.Windows.Application.b__1(未使用的对象)
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调、对象参数、Int32 numArgs)
位于MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(对象源、委托方法、对象参数、Int32 numArgs、委托catchHandler)
位于System.Windows.Threading.Dispatcher.WrappedInvoke(委托回调、对象args、Int32 numArgs、委托catchHandler)
在System.Windows.Threading.DispatcherOperation.InvokeImpl()中
位于System.Threading.ExecutionContext.runTryCode(对象用户数据)
在System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode代码、CleanupCode backoutCode、Object userData)中运行
在System.Threading.ExecutionContext.Run(ExecutionContext ExecutionContext,ContextCallback回调,对象状态,布尔ignoreSyncCtx)
在System.Threading.ExecutionContext.Run(ExecutionContext ExecutionContext,ContextCallback回调,对象状态)
在System.Windows.Threading.DispatcherOperation.Invoke()中
在System.Windows.Threading.Dispatcher.ProcessQueue()中
位于System.Windows.Threading.Dispatcher.WndProcHook(IntPtr-hwnd、Int32-msg、IntPtr-wParam、IntPtr-lParam、Boolean和handled)
在MS.Win32.HwndWrapper.WndProc(IntPtr-hwnd、Int32-msg、IntPtr-wParam、IntPtr-lParam、Boolean和handled)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(对象o)上
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调、对象参数、Int32 numArgs)
位于MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(对象源、委托方法、对象参数、Int32 numArgs、委托catchHandler)
位于System.Windows.Threading.Dispatcher.WrappedInvoke(委托回调、对象args、Int32 numArgs、委托catchHandler)
位于System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority优先级、TimeSpan超时、委托方法、对象参数、Int32 numArgs)
位于MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd、Int32 msg、IntPtr wParam、IntPtr lParam)
位于MS.Win32.unsafentivemethods.DispatchMessage(MSG&MSG)
位于System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame框架)
位于System.Windows.Application.RunInternal(窗口)
在System.Windows.Application.Run()处
在C:\surface\testvncharpwpf\obj\Debug\App.g.cs中的testvncharpwpf.App.Main()处:第0行
位于System.AppDomain.\u nExecuteAssembly(RuntimeAssembly程序集,字符串[]args)
在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()上
在System.Threading.ExecutionContext.Run(ExecutionContext ExecutionContext,ContextCallback回调,对象状态,布尔ignoreSyncCtx)
在System.Threading.ExecutionContext.Run(ExecutionContext ExecutionContext,ContextCallback回调,对象状态)
位于System.Threading.ThreadHelper.ThreadStart()处
InnerException:System.BadImageFormatException
Message=无法加载文件或程序集“VncSharpWpf,版本=0.0.0.1,区域性=中立,PublicKeyToken=null”或其依赖项之一。试图加载格式不正确的程序。
Source=TestVncSharpWpf
FileName=VncSharpWpf,版本=0.0.0.1,区域性=neutral,PublicKeyToken=null
FusionLog===预绑定状态信息===
日志:用户=测试PC\test
日志:DisplayName=VncSharpWpf,版本=0.0.0.1,区域性=neutral,PublicKeyToken=null
(详细说明)
日志:Appbase=file:///C:/surface/TestVNCSharpWPF/bin/Debug/
日志:初始PrivatePath=NULL
调用程序集:TestVncSharpWpf,版本=1.0.0.0,区域性=neutral,PublicKeyToken=null。
===
日志:此绑定在默认加载上下文中启动。
日志:未找到应用程序配置文件。
日志:使用主机配置文件:
日志:使用C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config中的计算机配置文件。
日志:此时未将策略应用于引用(私有、自定义、部分或基于位置的程序集绑定)。
日志:正在尝试下载新URLfile:///C:/surface/TestVNCSharpWPF/bin/Debug/VncSharpWpf.DLL.
错误:未能完成安装